Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dk131072
spring-framework
提交
a6048765
S
spring-framework
项目概览
dk131072
/
spring-framework
与 Fork 源项目一致
从无法访问的项目Fork
通知
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,发现更多精彩内容 >>
提交
a6048765
编写于
4月 03, 2011
作者:
S
Sam Brannen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
polishing JavaDoc
上级
744facbf
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
28 deletion
+8
-28
org.springframework.test/src/main/java/org/springframework/test/context/TestContext.java
...in/java/org/springframework/test/context/TestContext.java
+8
-28
未找到文件。
org.springframework.test/src/main/java/org/springframework/test/context/TestContext.java
浏览文件 @
a6048765
...
...
@@ -79,15 +79,12 @@ public class TestContext extends AttributeAccessorSupport {
* and {@link ContextCache context cache} and parse the corresponding
* {@link ContextConfiguration @ContextConfiguration} annotation, if
* present.
* <p>
* If the supplied class name for the default ContextLoader is
* <p>If the supplied class name for the default ContextLoader is
* <code>null</code> or <em>empty</em> and no <code>ContextLoader</code>
* class is explicitly supplied via the
* <code>@ContextConfiguration</code> annotation, a
* {@link org.springframework.test.context.support.GenericXmlContextLoader
* GenericXmlContextLoader} will be used instead.
* </p>
*
* @param testClass the test class for which the test context should be
* constructed (must not be <code>null</code>)
* @param contextCache the context cache from which the constructed test
...
...
@@ -132,7 +129,6 @@ public class TestContext extends AttributeAccessorSupport {
}
/**
* <p>
* Retrieve the {@link ContextLoader} {@link Class} to use for the supplied
* {@link Class test class}.
* <ol>
...
...
@@ -146,14 +142,11 @@ public class TestContext extends AttributeAccessorSupport {
* the class hierarchy, an attempt will be made to load and return the class
* with the supplied <code>defaultContextLoaderClassName</code>.</li>
* </ol>
*
* @param clazz the class for which to retrieve <code>ContextLoader</code>
* class; must not be <code>null</code>
* @param defaultContextLoaderClassName the name of the default
* <code>ContextLoader</code> class to use; must not be <code>null</code> or
* empty
* @return the <code>ContextLoader</code> class to use for the specified
* class
* <code>ContextLoader</code> class to use; must not be <code>null</code> or empty
* @return the <code>ContextLoader</code> class to use for the specified class
* @throws IllegalArgumentException if {@link ContextConfiguration
* @ContextConfiguration} is not <em>present</em> on the supplied class
*/
...
...
@@ -209,14 +202,12 @@ public class TestContext extends AttributeAccessorSupport {
* {@link Class class}, using the supplied {@link ContextLoader} to
* {@link ContextLoader#processLocations(Class, String...) process} the
* locations.
* <p>
* Note that the {@link ContextConfiguration#inheritLocations()
* <p>Note that the {@link ContextConfiguration#inheritLocations()
* inheritLocations} flag of {@link ContextConfiguration
* @ContextConfiguration} will be taken into consideration.
* Specifically, if the <code>inheritLocations</code> flag is set to
* <code>true</code>, locations defined in the annotated class will be
* appended to the locations defined in superclasses.
*
* @param contextLoader the ContextLoader to use for processing the
* locations (must not be <code>null</code>)
* @param clazz the class for which to retrieve the resource locations (must
...
...
@@ -299,9 +290,7 @@ public class TestContext extends AttributeAccessorSupport {
/**
* Load an <code>ApplicationContext</code> for this test context using the
* configured <code>ContextLoader</code> and resource locations.
*
* @throws Exception if an error occurs while loading the application
* context
* @throws Exception if an error occurs while loading the application context
*/
private
ApplicationContext
loadApplicationContext
()
throws
Exception
{
Assert
.
notNull
(
this
.
contextLoader
,
"Can not load an ApplicationContext with a NULL 'contextLoader'. "
...
...
@@ -322,7 +311,6 @@ public class TestContext extends AttributeAccessorSupport {
/**
* Get the {@link ApplicationContext application context} for this test
* context, possibly cached.
*
* @return the application context
* @throws IllegalStateException if an error occurs while retrieving the
* application context
...
...
@@ -345,7 +333,6 @@ public class TestContext extends AttributeAccessorSupport {
/**
* Get the {@link Class test class} for this test context.
*
* @return the test class (never <code>null</code>)
*/
public
final
Class
<?>
getTestClass
()
{
...
...
@@ -354,9 +341,7 @@ public class TestContext extends AttributeAccessorSupport {
/**
* Get the current {@link Object test instance} for this test context.
* <p>
* Note: this is a mutable property.
*
* <p>Note: this is a mutable property.
* @return the current test instance (may be <code>null</code>)
* @see #updateState(Object,Method,Throwable)
*/
...
...
@@ -366,9 +351,7 @@ public class TestContext extends AttributeAccessorSupport {
/**
* Get the current {@link Method test method} for this test context.
* <p>
* Note: this is a mutable property.
*
* <p>Note: this is a mutable property.
* @return the current test method (may be <code>null</code>)
* @see #updateState(Object, Method, Throwable)
*/
...
...
@@ -379,9 +362,7 @@ public class TestContext extends AttributeAccessorSupport {
/**
* Get the {@link Throwable exception} that was thrown during execution of
* the {@link #getTestMethod() test method}.
* <p>
* Note: this is a mutable property.
*
* <p>Note: this is a mutable property.
* @return the exception that was thrown, or <code>null</code> if no
* exception was thrown
* @see #updateState(Object, Method, Throwable)
...
...
@@ -403,7 +384,6 @@ public class TestContext extends AttributeAccessorSupport {
/**
* Update this test context to reflect the state of the currently executing
* test.
*
* @param testInstance the current test instance (may be <code>null</code>)
* @param testMethod the current test method (may be <code>null</code>)
* @param testException the exception that was thrown in the test method, or
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录