-
1. Re: How to test agains Exceptions using TestNg
accless Sep 23, 2008 4:34 PM (in response to accless)Problem solved by myself and i would like to share this info. I think seam doc needs an update on this issue!
If u would like to do testing against exceptions us following annotation:
@Test(expectedExceptions={YYY.class})
and use
new ComponentenTest() { //ur tests }.run()
instead of new FacesRequest!
Greetings
PS: I think.
-
2. Re: How to test agains Exceptions using TestNg
gjeudy Sep 23, 2008 4:37 PM (in response to accless)I don't think it should go in Seam doc. Just a pointer to testNG should be enough.
Documenting all the frameworks Seam uses in Seam doc wouldn't make much sense to me.
-
3. Re: How to test agains Exceptions using TestNg
accless Sep 23, 2008 4:48 PM (in response to accless)Well, the testng doc was not much helpful either for me.
And the fact of using ComponentTest instead of FacesRequest is a restriction/limitation of seam and not testng, i think. But maybe i am wrong...
greetings
-
4. Re: How to test agains Exceptions using TestNg
gjeudy Sep 23, 2008 5:07 PM (in response to accless)Ah now I see what you mean. I stand corrected.
Ok in this case I think you should file a documentation JIRA. All works is JIRA based so if you want to make it happen you need to put it in there.
regards,
-Guillaume -
5. Re: How to test agains Exceptions using TestNg
cbeust Sep 25, 2008 2:52 AM (in response to accless)I apologize for this: the TestNG documentation was still referring to the deprecated @ExpectedExceptions annotation. I corrected it to only mention that expectedException is now an attribute on the @Test annotation.
Sorry for the confusion.
--
Cedric