Announcement Announcement Module
Collapse
No announcement yet.
Is @Theory supported ? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is @Theory supported ?

    Hi,

    I was wondering whether Spring 3.0.0 RC1 is providing support for JUnit tests using the @Theory annotation. If so, how should it be used ?

    Thanks !

    Jan

  • #2
    If you want to use @Theory in conjunction with standard (i.e., non-Spring-specific) JUnit tests, you can annotate your test class with @RunWith(Theories.class).

    However, if you want to use the Spring TestContext Framework you cannot use @Theory. This is due to the fact that the TestContext Framework requires use of SpringJUnit4ClassRunner with JUnit 4.

    Since the JUnit architecture does not permit the use of two custom Runners simultaneously, you therefore cannot use Theories and SpringJUnit4ClassRunner at the same time.

    Regards,

    Sam

    Comment


    • #3
      Any news from this ?

      I've been waiting for TWO years now. About time Spring does something for it. ! Just kidding... ;-)

      Comment


      • #4
        I've found a workaround for this. See here.

        Comment

        Working...
        X