Re: Theory annotation bug: 2196462
"David Saff" <[email protected]> Sun, 14 Dec 2008 13:44:26 -0500
| Newsgroups | gmane.comp.java.junit.devel |
|---|---|
| Message-ID | <[email protected]> |
Mostly right, except that a @Test method with parameters should be flagged as invalid. Thanks for looking into this, David Saff On Sun, Dec 14, 2008 at 12:58 PM, Amanda Robinson <[email protected] > wrote: > The bug pasted below, @Theory annotation optional when running with > Theories, is currently unassigned. As long as nobody takes issue, I'm > going to dig into this a bit and hope to submit a patch soon. It > appears related to [ 2191102 ] AllMembersSupplier should only add > @DataPoint fields, so I may look into that bug as well. > > It appears that correct behavior is as follows: > - within a class annotated with @RunWith(Theories.class): > - any method annotated with @Theory should test all input > annotated with @DataPoint > - any method annotated with @Test should run as a standard test and > ignore > > Is this correct? If not, what is correct expected behavior? > > Thanks, > ~Amanda > > > > https://sourceforge.net/tracker/index.php?func=detail&aid=2196462&group_id=15278&atid=115278 > > Summary: (?) > @Theory annotation optional when running with Theories Private: (?) > No > The implementation of > org.junit.experimental.theories.Theories's computeTestMethods incorrectly > leaves @Test methods as @Theory methods. > > The following code: > @RunWith(Theories.class) > public class FooTest { > public static int VALUE=1; > @Test > public void bar(int i) { > System.out.println("bar:" +i); > > } > } > > Produces the result: bar:1 > > > ------------------------------------------------------------------------------ > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. > The future of the web can't happen without you. Join us at MIX09 to help > pave the way to the Next Web now. Learn more and register at > > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > _______________________________________________ > Junit-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/junit-devel > ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Junit-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/junit-devel