Hi,

I am having an issue using jUnit tests and handling exceptions in Java.

I created my testClass with both the annotations 
@RunWith(DevAppServerTestRunner.class) and 
@DevAppServerTest(TestConfig.class) since I need to test a method that use 
some properties configured in my appengine-web.xml file.

The problem comes when, after declaring a jUnit @Rule to define an 
Exception I want to test, I ran the test and got an error saying "The Rule 
myExceptionName must implement MethodRule or TestRule". That's pretty 
strange since the exception I declared is of type Expectedexception, a 
jUnit class tha already implements TestRule.

I suspect this issue has something to do with my @RunWith and 
@DevAppServerTest annotation because using another class without these the 
Rule implementation works(solution I can't use since I need to read some 
properties from appengine-web.xml).

Did anyone encounter something similar or have a clue on how to deal with 
this? 

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/0f494848-606d-41c3-b296-60f87779b2c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to