Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
da893328
S
spring-framework
项目概览
爱吃血肠
/
spring-framework
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
da893328
编写于
7月 09, 2016
作者:
S
Sam Brannen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Introduce before/after test execution support in SpringJUnit4ClassRunner
Issue: SPR-4365
上级
3da5fbe9
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
257 addition
and
30 deletion
+257
-30
spring-test/src/main/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunner.java
...ramework/test/context/junit4/SpringJUnit4ClassRunner.java
+29
-4
spring-test/src/main/java/org/springframework/test/context/junit4/rules/SpringMethodRule.java
...framework/test/context/junit4/rules/SpringMethodRule.java
+8
-2
spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunAfterTestExecutionCallbacks.java
...ext/junit4/statements/RunAfterTestExecutionCallbacks.java
+100
-0
spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunBeforeTestExecutionCallbacks.java
...xt/junit4/statements/RunBeforeTestExecutionCallbacks.java
+76
-0
spring-test/src/test/java/org/springframework/test/context/junit4/FailingBeforeAndAfterMethodsSpringRunnerTests.java
...junit4/FailingBeforeAndAfterMethodsSpringRunnerTests.java
+41
-20
spring-test/src/test/java/org/springframework/test/context/junit4/rules/FailingBeforeAndAfterMethodsSpringRuleTests.java
...t4/rules/FailingBeforeAndAfterMethodsSpringRuleTests.java
+3
-4
未找到文件。
spring-test/src/main/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunner.java
浏览文件 @
da893328
...
...
@@ -42,8 +42,10 @@ import org.springframework.test.context.TestContextManager;
import
org.springframework.test.context.junit4.rules.SpringClassRule
;
import
org.springframework.test.context.junit4.rules.SpringMethodRule
;
import
org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks
;
import
org.springframework.test.context.junit4.statements.RunAfterTestExecutionCallbacks
;
import
org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks
;
import
org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks
;
import
org.springframework.test.context.junit4.statements.RunBeforeTestExecutionCallbacks
;
import
org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks
;
import
org.springframework.test.context.junit4.statements.SpringFailOnTimeout
;
import
org.springframework.test.context.junit4.statements.SpringRepeat
;
...
...
@@ -270,6 +272,9 @@ public class SpringJUnit4ClassRunner extends BlockJUnit4ClassRunner {
* Spring-specific timeouts in that the former execute in a separate
* thread while the latter simply execute in the main thread (like regular
* tests).
* @see #methodInvoker(FrameworkMethod, Object)
* @see #withBeforeTestExecutionCallbacks(FrameworkMethod, Object, Statement)
* @see #withAfterTestExecutionCallbacks(FrameworkMethod, Object, Statement)
* @see #possiblyExpectingExceptions(FrameworkMethod, Object, Statement)
* @see #withBefores(FrameworkMethod, Object, Statement)
* @see #withAfters(FrameworkMethod, Object, Statement)
...
...
@@ -293,6 +298,8 @@ public class SpringJUnit4ClassRunner extends BlockJUnit4ClassRunner {
}
Statement
statement
=
methodInvoker
(
frameworkMethod
,
testInstance
);
statement
=
withBeforeTestExecutionCallbacks
(
frameworkMethod
,
testInstance
,
statement
);
statement
=
withAfterTestExecutionCallbacks
(
frameworkMethod
,
testInstance
,
statement
);
statement
=
possiblyExpectingExceptions
(
frameworkMethod
,
testInstance
,
statement
);
statement
=
withBefores
(
frameworkMethod
,
testInstance
,
statement
);
statement
=
withAfters
(
frameworkMethod
,
testInstance
,
statement
);
...
...
@@ -404,6 +411,26 @@ public class SpringJUnit4ClassRunner extends BlockJUnit4ClassRunner {
return
TestAnnotationUtils
.
getTimeout
(
frameworkMethod
.
getMethod
());
}
/**
* Wrap the supplied {@link Statement} with a {@code RunBeforeTestExecutionCallbacks}
* statement, thus preserving the default functionality while adding support for the
* Spring TestContext Framework.
* @see RunBeforeTestExecutionCallbacks
*/
protected
Statement
withBeforeTestExecutionCallbacks
(
FrameworkMethod
frameworkMethod
,
Object
testInstance
,
Statement
statement
)
{
return
new
RunBeforeTestExecutionCallbacks
(
statement
,
testInstance
,
frameworkMethod
.
getMethod
(),
getTestContextManager
());
}
/**
* Wrap the supplied {@link Statement} with a {@code RunAfterTestExecutionCallbacks}
* statement, thus preserving the default functionality while adding support for the
* Spring TestContext Framework.
* @see RunAfterTestExecutionCallbacks
*/
protected
Statement
withAfterTestExecutionCallbacks
(
FrameworkMethod
frameworkMethod
,
Object
testInstance
,
Statement
statement
)
{
return
new
RunAfterTestExecutionCallbacks
(
statement
,
testInstance
,
frameworkMethod
.
getMethod
(),
getTestContextManager
());
}
/**
* Wrap the {@link Statement} returned by the parent implementation with a
* {@code RunBeforeTestMethodCallbacks} statement, thus preserving the
...
...
@@ -414,8 +441,7 @@ public class SpringJUnit4ClassRunner extends BlockJUnit4ClassRunner {
@Override
protected
Statement
withBefores
(
FrameworkMethod
frameworkMethod
,
Object
testInstance
,
Statement
statement
)
{
Statement
junitBefores
=
super
.
withBefores
(
frameworkMethod
,
testInstance
,
statement
);
return
new
RunBeforeTestMethodCallbacks
(
junitBefores
,
testInstance
,
frameworkMethod
.
getMethod
(),
getTestContextManager
());
return
new
RunBeforeTestMethodCallbacks
(
junitBefores
,
testInstance
,
frameworkMethod
.
getMethod
(),
getTestContextManager
());
}
/**
...
...
@@ -428,8 +454,7 @@ public class SpringJUnit4ClassRunner extends BlockJUnit4ClassRunner {
@Override
protected
Statement
withAfters
(
FrameworkMethod
frameworkMethod
,
Object
testInstance
,
Statement
statement
)
{
Statement
junitAfters
=
super
.
withAfters
(
frameworkMethod
,
testInstance
,
statement
);
return
new
RunAfterTestMethodCallbacks
(
junitAfters
,
testInstance
,
frameworkMethod
.
getMethod
(),
getTestContextManager
());
return
new
RunAfterTestMethodCallbacks
(
junitAfters
,
testInstance
,
frameworkMethod
.
getMethod
(),
getTestContextManager
());
}
/**
...
...
spring-test/src/main/java/org/springframework/test/context/junit4/rules/SpringMethodRule.java
浏览文件 @
da893328
/*
* Copyright 2002-201
5
the original author or authors.
* Copyright 2002-201
6
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -37,7 +37,7 @@ import org.springframework.util.ClassUtils;
import
org.springframework.util.ReflectionUtils
;
/**
* {@code SpringMethodRule} is a custom JUnit {@link MethodRule} that
* {@code SpringMethodRule} is a custom JUnit
4
{@link MethodRule} that
* supports instance-level and method-level features of the
* <em>Spring TestContext Framework</em> in standard JUnit tests by means
* of the {@link TestContextManager} and associated support classes and
...
...
@@ -82,6 +82,12 @@ import org.springframework.util.ReflectionUtils;
*
* <p><strong>NOTE:</strong> As of Spring Framework 4.3, this class requires JUnit 4.12 or higher.
*
* <p><strong>WARNING:</strong> Due to the shortcomings of JUnit rules, the
* {@code SpringMethodRule} does <strong>not</strong> support the
* {@code beforeTestExecution()} and {@code afterTestExecution()} callbacks of the
* {@link org.springframework.test.context.TestExecutionListener TestExecutionListener}
* API.
*
* @author Sam Brannen
* @author Philippe Marschall
* @since 4.2
...
...
spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunAfterTestExecutionCallbacks.java
0 → 100644
浏览文件 @
da893328
/*
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.springframework.test.context.junit4.statements
;
import
java.lang.reflect.Method
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.junit.runners.model.MultipleFailureException
;
import
org.junit.runners.model.Statement
;
import
org.springframework.test.context.TestContextManager
;
/**
* {@code RunAfterTestExecutionCallbacks} is a custom JUnit {@link Statement}
* which allows the <em>Spring TestContext Framework</em> to be plugged into the
* JUnit 4 execution chain by calling {@link TestContextManager#afterTestExecution
* afterTestExecution()} on the supplied {@link TestContextManager}.
*
* <p><strong>NOTE:</strong> This class requires JUnit 4.9 or higher.
*
* @author Sam Brannen
* @since 5.0
* @see #evaluate()
* @see RunBeforeTestExecutionCallbacks
*/
public
class
RunAfterTestExecutionCallbacks
extends
Statement
{
private
final
Statement
next
;
private
final
Object
testInstance
;
private
final
Method
testMethod
;
private
final
TestContextManager
testContextManager
;
/**
* Construct a new {@code RunAfterTestExecutionCallbacks} statement.
* @param next the next {@code Statement} in the execution chain
* @param testInstance the current test instance (never {@code null})
* @param testMethod the test method which has just been executed on the
* test instance
* @param testContextManager the TestContextManager upon which to call
* {@code afterTestExecution()}
*/
public
RunAfterTestExecutionCallbacks
(
Statement
next
,
Object
testInstance
,
Method
testMethod
,
TestContextManager
testContextManager
)
{
this
.
next
=
next
;
this
.
testInstance
=
testInstance
;
this
.
testMethod
=
testMethod
;
this
.
testContextManager
=
testContextManager
;
}
/**
* Evaluate the next {@link Statement} in the execution chain (typically an
* instance of {@link RunBeforeTestExecutionCallbacks}), catching any exceptions
* thrown, and then invoke {@link TestContextManager#afterTestExecution} supplying
* the first caught exception (if any).
* <p>If the invocation of {@code afterTestExecution()} throws an exception, that
* exception will also be tracked. Multiple exceptions will be combined into a
* {@link MultipleFailureException}.
*/
@Override
public
void
evaluate
()
throws
Throwable
{
Throwable
testException
=
null
;
List
<
Throwable
>
errors
=
new
ArrayList
<>();
try
{
this
.
next
.
evaluate
();
}
catch
(
Throwable
ex
)
{
testException
=
ex
;
errors
.
add
(
ex
);
}
try
{
this
.
testContextManager
.
afterTestExecution
(
this
.
testInstance
,
this
.
testMethod
,
testException
);
}
catch
(
Throwable
ex
)
{
errors
.
add
(
ex
);
}
MultipleFailureException
.
assertEmpty
(
errors
);
}
}
spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunBeforeTestExecutionCallbacks.java
0 → 100644
浏览文件 @
da893328
/*
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.springframework.test.context.junit4.statements
;
import
java.lang.reflect.Method
;
import
org.junit.runners.model.Statement
;
import
org.springframework.test.context.TestContextManager
;
/**
* {@code RunBeforeTestExecutionCallbacks} is a custom JUnit {@link Statement}
* which allows the <em>Spring TestContext Framework</em> to be plugged into the
* JUnit 4 execution chain by calling {@link TestContextManager#beforeTestExecution
* beforeTestExecution()} on the supplied {@link TestContextManager}.
*
* @author Sam Brannen
* @since 5.0
* @see #evaluate()
* @see RunAfterTestExecutionCallbacks
*/
public
class
RunBeforeTestExecutionCallbacks
extends
Statement
{
private
final
Statement
next
;
private
final
Object
testInstance
;
private
final
Method
testMethod
;
private
final
TestContextManager
testContextManager
;
/**
* Construct a new {@code RunBeforeTestExecutionCallbacks} statement.
* @param next the next {@code Statement} in the execution chain
* @param testInstance the current test instance (never {@code null})
* @param testMethod the test method which is about to be executed on the
* test instance
* @param testContextManager the TestContextManager upon which to call
* {@code beforeTestExecution()}
*/
public
RunBeforeTestExecutionCallbacks
(
Statement
next
,
Object
testInstance
,
Method
testMethod
,
TestContextManager
testContextManager
)
{
this
.
next
=
next
;
this
.
testInstance
=
testInstance
;
this
.
testMethod
=
testMethod
;
this
.
testContextManager
=
testContextManager
;
}
/**
* Invoke {@link TestContextManager#beforeTestExecution(Object, Method)}
* and then evaluate the next {@link Statement} in the execution chain
* (typically an instance of
* {@link org.junit.internal.runners.statements.InvokeMethod InvokeMethod}).
*/
@Override
public
void
evaluate
()
throws
Throwable
{
this
.
testContextManager
.
beforeTestExecution
(
this
.
testInstance
,
this
.
testMethod
);
this
.
next
.
evaluate
();
}
}
spring-test/src/test/java/org/springframework/test/context/junit4/FailingBeforeAndAfterMethods
JUnit
Tests.java
→
spring-test/src/test/java/org/springframework/test/context/junit4/FailingBeforeAndAfterMethods
SpringRunner
Tests.java
浏览文件 @
da893328
...
...
@@ -27,7 +27,6 @@ import org.springframework.test.context.ContextConfiguration;
import
org.springframework.test.context.TestContext
;
import
org.springframework.test.context.TestExecutionListener
;
import
org.springframework.test.context.TestExecutionListeners
;
import
org.springframework.test.context.support.AbstractTestExecutionListener
;
import
org.springframework.test.context.transaction.AfterTransaction
;
import
org.springframework.test.context.transaction.BeforeTransaction
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -37,26 +36,21 @@ import static org.junit.Assert.*;
import
static
org
.
springframework
.
test
.
context
.
junit4
.
JUnitTestingUtils
.*;
/**
*
JUnit 4 based integration test for verifying
that '<i>before</i>' and '<i>after</i>'
*
Integration tests which verify
that '<i>before</i>' and '<i>after</i>'
* methods of {@link TestExecutionListener TestExecutionListeners} as well as
* {@link BeforeTransaction @BeforeTransaction} and
* {@link AfterTransaction @AfterTransaction} methods can fail a test in a
* JUnit environment, as requested in
* <a href="https://jira.spring.io/browse/SPR-3960" target="_blank">SPR-3960</a>.
* {@code @BeforeTransaction} and {@code @AfterTransaction} methods can fail
* tests run via the {@link SpringRunner} in a JUnit 4 environment.
*
* <p>Indirectly, this class also verifies that all {@link TestExecutionListener}
* lifecycle callbacks are called.
* <p>See: <a href="https://jira.spring.io/browse/SPR-3960" target="_blank">SPR-3960</a>.
*
* <p>As of Spring 3.0, this class also tests support for the new
* {@link TestExecutionListener#beforeTestClass(TestContext) beforeTestClass()}
* and {@link TestExecutionListener#afterTestClass(TestContext)
* afterTestClass()} lifecycle callback methods.
* <p>Indirectly, this class also verifies that all {@code TestExecutionListener}
* lifecycle callbacks are called.
*
* @author Sam Brannen
* @since 2.5
*/
@RunWith
(
Parameterized
.
class
)
public
class
FailingBeforeAndAfterMethods
JUnit
Tests
{
public
class
FailingBeforeAndAfterMethods
SpringRunner
Tests
{
protected
final
Class
<?>
clazz
;
...
...
@@ -68,13 +62,15 @@ public class FailingBeforeAndAfterMethodsJUnitTests {
AlwaysFailingAfterTestClassTestCase
.
class
.
getSimpleName
(),
//
AlwaysFailingPrepareTestInstanceTestCase
.
class
.
getSimpleName
(),
//
AlwaysFailingBeforeTestMethodTestCase
.
class
.
getSimpleName
(),
//
AlwaysFailingBeforeTestExecutionTestCase
.
class
.
getSimpleName
(),
//
AlwaysFailingAfterTestExecutionTestCase
.
class
.
getSimpleName
(),
//
AlwaysFailingAfterTestMethodTestCase
.
class
.
getSimpleName
(),
//
FailingBeforeTransactionTestCase
.
class
.
getSimpleName
(),
//
FailingAfterTransactionTestCase
.
class
.
getSimpleName
()
//
};
}
public
FailingBeforeAndAfterMethods
JUnit
Tests
(
String
testClassName
)
throws
Exception
{
public
FailingBeforeAndAfterMethods
SpringRunner
Tests
(
String
testClassName
)
throws
Exception
{
this
.
clazz
=
ClassUtils
.
forName
(
getClass
().
getName
()
+
"."
+
testClassName
,
getClass
().
getClassLoader
());
}
...
...
@@ -93,7 +89,7 @@ public class FailingBeforeAndAfterMethodsJUnitTests {
// -------------------------------------------------------------------
protected
static
class
AlwaysFailingBeforeTestClassTestExecutionListener
extends
Abstract
TestExecutionListener
{
protected
static
class
AlwaysFailingBeforeTestClassTestExecutionListener
implements
TestExecutionListener
{
@Override
public
void
beforeTestClass
(
TestContext
testContext
)
{
...
...
@@ -101,7 +97,7 @@ public class FailingBeforeAndAfterMethodsJUnitTests {
}
}
protected
static
class
AlwaysFailingAfterTestClassTestExecutionListener
extends
Abstract
TestExecutionListener
{
protected
static
class
AlwaysFailingAfterTestClassTestExecutionListener
implements
TestExecutionListener
{
@Override
public
void
afterTestClass
(
TestContext
testContext
)
{
...
...
@@ -109,7 +105,7 @@ public class FailingBeforeAndAfterMethodsJUnitTests {
}
}
protected
static
class
AlwaysFailingPrepareTestInstanceTestExecutionListener
extends
Abstract
TestExecutionListener
{
protected
static
class
AlwaysFailingPrepareTestInstanceTestExecutionListener
implements
TestExecutionListener
{
@Override
public
void
prepareTestInstance
(
TestContext
testContext
)
throws
Exception
{
...
...
@@ -117,7 +113,7 @@ public class FailingBeforeAndAfterMethodsJUnitTests {
}
}
protected
static
class
AlwaysFailingBeforeTestMethodTestExecutionListener
extends
Abstract
TestExecutionListener
{
protected
static
class
AlwaysFailingBeforeTestMethodTestExecutionListener
implements
TestExecutionListener
{
@Override
public
void
beforeTestMethod
(
TestContext
testContext
)
{
...
...
@@ -125,7 +121,15 @@ public class FailingBeforeAndAfterMethodsJUnitTests {
}
}
protected
static
class
AlwaysFailingAfterTestMethodTestExecutionListener
extends
AbstractTestExecutionListener
{
protected
static
class
AlwaysFailingBeforeTestExecutionTestExecutionListener
implements
TestExecutionListener
{
@Override
public
void
beforeTestExecution
(
TestContext
testContext
)
{
fail
(
"always failing beforeTestExecution()"
);
}
}
protected
static
class
AlwaysFailingAfterTestMethodTestExecutionListener
implements
TestExecutionListener
{
@Override
public
void
afterTestMethod
(
TestContext
testContext
)
{
...
...
@@ -133,8 +137,15 @@ public class FailingBeforeAndAfterMethodsJUnitTests {
}
}
protected
static
class
AlwaysFailingAfterTestExecutionTestExecutionListener
implements
TestExecutionListener
{
@Override
public
void
afterTestExecution
(
TestContext
testContext
)
{
fail
(
"always failing afterTestExecution()"
);
}
}
@RunWith
(
SpringRunner
.
class
)
@TestExecutionListeners
({})
public
static
abstract
class
BaseTestCase
{
@Test
...
...
@@ -162,6 +173,16 @@ public class FailingBeforeAndAfterMethodsJUnitTests {
public
static
class
AlwaysFailingBeforeTestMethodTestCase
extends
BaseTestCase
{
}
@Ignore
(
"TestCase classes are run manually by the enclosing test class"
)
@TestExecutionListeners
(
AlwaysFailingBeforeTestExecutionTestExecutionListener
.
class
)
public
static
class
AlwaysFailingBeforeTestExecutionTestCase
extends
BaseTestCase
{
}
@Ignore
(
"TestCase classes are run manually by the enclosing test class"
)
@TestExecutionListeners
(
AlwaysFailingAfterTestExecutionTestExecutionListener
.
class
)
public
static
class
AlwaysFailingAfterTestExecutionTestCase
extends
BaseTestCase
{
}
@Ignore
(
"TestCase classes are run manually by the enclosing test class"
)
@TestExecutionListeners
(
AlwaysFailingAfterTestMethodTestExecutionListener
.
class
)
public
static
class
AlwaysFailingAfterTestMethodTestCase
extends
BaseTestCase
{
...
...
spring-test/src/test/java/org/springframework/test/context/junit4/rules/FailingBeforeAndAfterMethodsSpringRuleTests.java
浏览文件 @
da893328
...
...
@@ -27,7 +27,7 @@ import org.junit.runners.Parameterized.Parameters;
import
org.springframework.test.context.ContextConfiguration
;
import
org.springframework.test.context.TestExecutionListeners
;
import
org.springframework.test.context.junit4.FailingBeforeAndAfterMethods
JUnit
Tests
;
import
org.springframework.test.context.junit4.FailingBeforeAndAfterMethods
SpringRunner
Tests
;
import
org.springframework.test.context.transaction.AfterTransaction
;
import
org.springframework.test.context.transaction.BeforeTransaction
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -35,14 +35,14 @@ import org.springframework.transaction.annotation.Transactional;
import
static
org
.
junit
.
Assert
.*;
/**
* This class is an extension of {@link FailingBeforeAndAfterMethods
JUnit
Tests}
* This class is an extension of {@link FailingBeforeAndAfterMethods
SpringRunner
Tests}
* that has been modified to use {@link SpringClassRule} and
* {@link SpringMethodRule}.
*
* @author Sam Brannen
* @since 4.2
*/
public
class
FailingBeforeAndAfterMethodsSpringRuleTests
extends
FailingBeforeAndAfterMethods
JUnit
Tests
{
public
class
FailingBeforeAndAfterMethodsSpringRuleTests
extends
FailingBeforeAndAfterMethods
SpringRunner
Tests
{
@Parameters
(
name
=
"{0}"
)
public
static
Object
[]
testData
()
{
...
...
@@ -69,7 +69,6 @@ public class FailingBeforeAndAfterMethodsSpringRuleTests extends FailingBeforeAn
// All tests are in superclass.
@RunWith
(
JUnit4
.
class
)
@TestExecutionListeners
({})
public
static
abstract
class
BaseSpringRuleTestCase
{
@ClassRule
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录