Re: Why have Rules to be public?
David Saff <[email protected]> Fri, 21 Jun 2013 15:22:53 -0400
| Newsgroups | gmane.comp.java.junit.user |
|---|---|
| Message-ID | <CALrw-PypFhOVpmriirLSABiUKn4CtcuyXEkwB8KjsMUziJsROw@mail.gmail.com> |
Mirko, Good question. To access a non-public member through reflection, JUnit would have to call Member.setAccessible, which can be disallowed by SecurityManager settings. Requiring all reflectively-accessed members of test classes to be public allows tests to be run in more different contexts. David On Fri, Jun 21, 2013 at 8:32 AM, Mirko Friedenhagen <[email protected] > wrote: > ** > > > Hello, > > what is the reasoning for the fact, that Rules have to be public. > Junit seems to be able to "find" them even when they are in the > default scope but complains about the scope. > > Regards Mirko > > [Non-text portions of this message have been removed] ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/junit/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/