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 <> 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?


Summary: (?)
@Theory annotation optional when running with Theories  Private: (?)
The implementation of
org.junit.experimental.theories.Theories's computeTestMethods incorrectly
leaves @Test methods as @Theory methods.

The following code:
public class FooTest {
public static int VALUE=1;
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;208669438;13503038;i?
Junit-devel mailing list