-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to JUnit 4 #97
Conversation
Remove `extends TestCase` from test classes. Add `@Test` to all test methods and `@Before` to `setUp()` methods.
Remove `extends TestCase` from test classes. Add `@Test` to all test methods, `@Before` to `setUp()` methods and `@After` to `tearDown()` methods. Class `JsfUtilsTests` still indirectly inherits from `TestCase` via `org.apache.myfaces.test.base.AbstractJsfTestCase`.
Remove `extends TestCase` from test classes. Add `@Test` to all test methods, `@Before` to `setUp()` methods and `@After` to `tearDown()` methods. Remove a couple unused imports in test classes.
Remove `AbstractFlowExecutionTests`'s dependency on `junit.framework.TestCase`. Also remove its constructors which are now useless. Also remove constructors taking a `String name` argument from `AbstractExternalizedFlowExecutionTests` and `AbstractXmlFlowExecutionTests` as that parameter is not used in any of the three classes.
I've already signed Pivotal's CLA, by the way. |
Also filed as SWF-1738 on jira.spring.io. |
@edysli, thanks for the contribution! I think internal tests should go directly to JUnit 5 while for the flow test support we should provide an option to upgrade to either JUnit 5 or 4 but not require it. That way we could get the changes into a maintenance release without waiting for another minor or major release. I've also split this into two parts, SWF-1739 and SWF-1740 with some initial thoughts. If you'd like to rework the PR accordingly that would be much appreciated! |
Hey @rstoyanchev, thanks for sharing your thoughts! :) That makes sense, I'll split this PR in two then. |
JUnit version 5 has been out for a while so it's time to upgrade from version 3 to 4, right? ;)
My end goal with this is to remove
AbstractFlowExecutionTests
's inheritance on JUnit 3'sTestCase
which causes all sorts of weirdness in my tests using Spring Webflow with JUnit 4 (need to use@RunWith(JUnit4.class)
). This prevents my flow tests from using JUnit 5.