Theory annotation bug: 2196462
"Amanda Robinson" <[email protected]> Sun, 14 Dec 2008 12:58:10 -0500
| Newsgroups | gmane.comp.java.junit.devel |
|---|---|
| Message-ID | <[email protected]> |
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/