Results 1 to 4 of 4

Thread: Is @Theory supported ?

  1. #1

    Question 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. #2
    Join Date
    Jan 2006
    Location
    Zürich, Switzerland
    Posts
    423

    Default

    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

  3. #3

    Default

    Any news from this ?

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

  4. #4

    Default

    I've found a workaround for this. See here.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •