- 11 7月, 2016 1 次提交
-
-
由 Sam Brannen 提交于
Issue: SPR-4365
-
- 20 12月, 2015 1 次提交
-
-
由 Sam Brannen 提交于
Issue: SPR-13275
-
- 29 9月, 2015 2 次提交
-
-
由 Juergen Hoeller 提交于
-
由 Sam Brannen 提交于
SpringJUnit4ClassRunner, SpringClassRule, and SpringMethodRule now throw an IllegalStateException with a meaningful message if JUnit 4.9 is not present in the classpath (specifically if org.junit.runners.model.MultipleFailureException cannot be loaded). Issue: SPR-13521
-
- 18 5月, 2015 2 次提交
-
-
由 Sam Brannen 提交于
-
由 Sam Brannen 提交于
-
- 17 5月, 2015 2 次提交
-
-
由 Sam Brannen 提交于
In order to simplify configuration of the SpringMethodRule and to ensure that the correct TestContextManager is always retrieved for the currently executing test class, this commit introduces a static TestContextManager cache in SpringClassRule. In addition, since it is not foreseen that SpringClassRule and SpringMethodRule should be able to be subclassed, their internal methods are now private instead of protected. Issue: SPR-7731
-
由 Sam Brannen 提交于
Since Spring Framework 2.5, support for integrating the Spring TestContext Framework (TCF) into JUnit 4 based tests has been provided via the SpringJUnit4ClassRunner, but this approach precludes the ability for tests to be run with alternative runners like JUnit's Parameterized or third-party runners such as the MockitoJUnitRunner. This commit remedies this situation by introducing @ClassRule and @Rule based alternatives to the SpringJUnit4ClassRunner. These rules are independent of any Runner and can therefore be combined with alternative runners. Due to the limitations of JUnit's implementation of rules, as of JUnit 4.12 it is currently impossible to create a single rule that can be applied both at the class level and at the method level (with access to the test instance). Consequently, this commit introduces the following two rules that must be used together. - SpringClassRule: a JUnit TestRule that provides the class-level functionality of the TCF to JUnit-based tests - SpringMethodRule: a JUnit MethodRule that provides the instance-level and method-level functionality of the TCF to JUnit-based tests In addition, this commit also introduces the following new JUnit Statements for use with rules: - RunPrepareTestInstanceCallbacks - ProfileValueChecker Issue: SPR-7731
-