[google-appengine] Re: DevAppServerTest @Rule problem

2019-04-18 Thread Mariateresa Cava
Thank you for your support. I've already posted this on Stackoverflow. 
Anyone who has other suggestions?

On Wednesday, April 17, 2019 at 11:26:42 PM UTC+2, yka...@google.com wrote:
>
> I think it would be best to post this on Stackoverflow with a code snippet 
> and the stack trace as it is better suited for technical development 
> questions.
>
> You can also check this doc 
> 
>  for 
> an example as well.
>

-- 
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/6366d960-989f-4c5c-8137-dcdd3ddba145%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] DevAppServerTest @Rule problem

2019-04-16 Thread Mariateresa Cava
 

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.