Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
9da39272
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 搜索 >>
提交
9da39272
编写于
8月 22, 2017
作者:
S
Sam Brannen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Polishing
上级
1cb96f47
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
21 addition
and
16 deletion
+21
-16
spring-test/src/test/java/org/springframework/test/context/junit/jupiter/nested/NestedTestsWithSpringAndJUnitJupiterTestCase.java
.../nested/NestedTestsWithSpringAndJUnitJupiterTestCase.java
+1
-1
spring-test/src/test/java/org/springframework/test/context/support/AbstractContextConfigurationUtilsTests.java
...ntext/support/AbstractContextConfigurationUtilsTests.java
+5
-0
spring-test/src/test/java/org/springframework/test/context/support/BootstrapTestUtilsMergedConfigTests.java
.../context/support/BootstrapTestUtilsMergedConfigTests.java
+15
-15
未找到文件。
spring-test/src/test/java/org/springframework/test/context/junit/jupiter/nested/NestedTestsWithSpringAndJUnitJupiterTestCase.java
浏览文件 @
9da39272
...
...
@@ -74,7 +74,7 @@ class NestedTestsWithSpringAndJUnitJupiterTestCase {
// -------------------------------------------------------------------------
@Configuration
public
static
class
TopLevelConfig
{
static
class
TopLevelConfig
{
@Bean
String
foo
()
{
...
...
spring-test/src/test/java/org/springframework/test/context/support/AbstractContextConfigurationUtilsTests.java
浏览文件 @
9da39272
...
...
@@ -108,6 +108,11 @@ abstract class AbstractContextConfigurationUtilsTests {
assertEquals
(
expectedInitializerClasses
,
mergedConfig
.
getContextInitializerClasses
());
}
@SafeVarargs
static
<
T
>
T
[]
array
(
T
...
objects
)
{
return
objects
;
}
static
class
Enigma
{
}
...
...
spring-test/src/test/java/org/springframework/test/context/support/BootstrapTestUtilsMergedConfigTests.java
浏览文件 @
9da39272
/*
* Copyright 2002-201
6
the original author or authors.
* Copyright 2002-201
7
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.
...
...
@@ -76,7 +76,7 @@ public class BootstrapTestUtilsMergedConfigTests extends AbstractContextConfigur
assertMergedConfig
(
mergedConfig
,
testClass
,
new
String
[]
{
"classpath:org/springframework/test/context/support/AbstractContextConfigurationUtilsTests$BareAnnotations-context.xml"
}
,
array
(
"classpath:org/springframework/test/context/support/AbstractContextConfigurationUtilsTests$BareAnnotations-context.xml"
)
,
EMPTY_CLASS_ARRAY
,
DelegatingSmartContextLoader
.
class
);
}
...
...
@@ -85,7 +85,7 @@ public class BootstrapTestUtilsMergedConfigTests extends AbstractContextConfigur
Class
<?>
testClass
=
LocationsFoo
.
class
;
MergedContextConfiguration
mergedConfig
=
buildMergedContextConfiguration
(
testClass
);
assertMergedConfig
(
mergedConfig
,
testClass
,
new
String
[]
{
"classpath:/foo.xml"
}
,
EMPTY_CLASS_ARRAY
,
assertMergedConfig
(
mergedConfig
,
testClass
,
array
(
"classpath:/foo.xml"
)
,
EMPTY_CLASS_ARRAY
,
DelegatingSmartContextLoader
.
class
);
}
...
...
@@ -94,7 +94,7 @@ public class BootstrapTestUtilsMergedConfigTests extends AbstractContextConfigur
Class
<?>
testClass
=
MetaLocationsFoo
.
class
;
MergedContextConfiguration
mergedConfig
=
buildMergedContextConfiguration
(
testClass
);
assertMergedConfig
(
mergedConfig
,
testClass
,
new
String
[]
{
"classpath:/foo.xml"
}
,
EMPTY_CLASS_ARRAY
,
assertMergedConfig
(
mergedConfig
,
testClass
,
array
(
"classpath:/foo.xml"
)
,
EMPTY_CLASS_ARRAY
,
DelegatingSmartContextLoader
.
class
);
}
...
...
@@ -107,8 +107,8 @@ public class BootstrapTestUtilsMergedConfigTests extends AbstractContextConfigur
private
void
buildMergedConfigWithMetaAnnotationAndClasses
(
Class
<?>
testClass
)
{
MergedContextConfiguration
mergedConfig
=
buildMergedContextConfiguration
(
testClass
);
assertMergedConfig
(
mergedConfig
,
testClass
,
EMPTY_STRING_ARRAY
,
new
Class
<?>[]
{
FooConfig
.
class
,
BarConfig
.
class
}
,
DelegatingSmartContextLoader
.
class
);
assertMergedConfig
(
mergedConfig
,
testClass
,
EMPTY_STRING_ARRAY
,
array
(
FooConfig
.
class
,
BarConfig
.
class
)
,
DelegatingSmartContextLoader
.
class
);
}
@Test
...
...
@@ -116,7 +116,7 @@ public class BootstrapTestUtilsMergedConfigTests extends AbstractContextConfigur
Class
<?>
testClass
=
ClassesFoo
.
class
;
MergedContextConfiguration
mergedConfig
=
buildMergedContextConfiguration
(
testClass
);
assertMergedConfig
(
mergedConfig
,
testClass
,
EMPTY_STRING_ARRAY
,
new
Class
<?>[]
{
FooConfig
.
class
}
,
assertMergedConfig
(
mergedConfig
,
testClass
,
EMPTY_STRING_ARRAY
,
array
(
FooConfig
.
class
)
,
DelegatingSmartContextLoader
.
class
);
}
...
...
@@ -136,10 +136,10 @@ public class BootstrapTestUtilsMergedConfigTests extends AbstractContextConfigur
assertNotEquals
(
standardMergedConfig
,
webMergedConfig
);
assertNotEquals
(
webMergedConfig
,
standardMergedConfig
);
assertMergedConfig
(
webMergedConfig
,
webTestClass
,
EMPTY_STRING_ARRAY
,
new
Class
<?>[]
{
FooConfig
.
class
}
,
assertMergedConfig
(
webMergedConfig
,
webTestClass
,
EMPTY_STRING_ARRAY
,
array
(
FooConfig
.
class
)
,
WebDelegatingSmartContextLoader
.
class
);
assertMergedConfig
(
standardMergedConfig
,
standardTestClass
,
EMPTY_STRING_ARRAY
,
new
Class
<?>[]
{
FooConfig
.
class
}
,
DelegatingSmartContextLoader
.
class
);
array
(
FooConfig
.
class
)
,
DelegatingSmartContextLoader
.
class
);
}
@Test
...
...
@@ -148,7 +148,7 @@ public class BootstrapTestUtilsMergedConfigTests extends AbstractContextConfigur
Class
<?
extends
ContextLoader
>
expectedContextLoaderClass
=
GenericPropertiesContextLoader
.
class
;
MergedContextConfiguration
mergedConfig
=
buildMergedContextConfiguration
(
testClass
);
assertMergedConfig
(
mergedConfig
,
testClass
,
new
String
[]
{
"classpath:/foo.properties"
}
,
EMPTY_CLASS_ARRAY
,
assertMergedConfig
(
mergedConfig
,
testClass
,
array
(
"classpath:/foo.properties"
)
,
EMPTY_CLASS_ARRAY
,
expectedContextLoaderClass
);
}
...
...
@@ -158,14 +158,14 @@ public class BootstrapTestUtilsMergedConfigTests extends AbstractContextConfigur
Class
<?
extends
ContextLoader
>
expectedContextLoaderClass
=
GenericPropertiesContextLoader
.
class
;
MergedContextConfiguration
mergedConfig
=
buildMergedContextConfiguration
(
testClass
);
assertMergedConfig
(
mergedConfig
,
testClass
,
EMPTY_STRING_ARRAY
,
new
Class
<?>[]
{
FooConfig
.
class
}
,
assertMergedConfig
(
mergedConfig
,
testClass
,
EMPTY_STRING_ARRAY
,
array
(
FooConfig
.
class
)
,
expectedContextLoaderClass
);
}
@Test
public
void
buildMergedConfigWithLocalAndInheritedAnnotationsAndLocations
()
{
Class
<?>
testClass
=
LocationsBar
.
class
;
String
[]
expectedLocations
=
new
String
[]
{
"/foo.xml"
,
"/bar.xml"
}
;
String
[]
expectedLocations
=
array
(
"/foo.xml"
,
"/bar.xml"
)
;
MergedContextConfiguration
mergedConfig
=
buildMergedContextConfiguration
(
testClass
);
assertMergedConfig
(
mergedConfig
,
testClass
,
expectedLocations
,
EMPTY_CLASS_ARRAY
,
...
...
@@ -175,7 +175,7 @@ public class BootstrapTestUtilsMergedConfigTests extends AbstractContextConfigur
@Test
public
void
buildMergedConfigWithLocalAndInheritedAnnotationsAndClasses
()
{
Class
<?>
testClass
=
ClassesBar
.
class
;
Class
<?>[]
expectedClasses
=
new
Class
<?>[]
{
FooConfig
.
class
,
BarConfig
.
class
}
;
Class
<?>[]
expectedClasses
=
array
(
FooConfig
.
class
,
BarConfig
.
class
)
;
MergedContextConfiguration
mergedConfig
=
buildMergedContextConfiguration
(
testClass
);
assertMergedConfig
(
mergedConfig
,
testClass
,
EMPTY_STRING_ARRAY
,
expectedClasses
,
...
...
@@ -185,7 +185,7 @@ public class BootstrapTestUtilsMergedConfigTests extends AbstractContextConfigur
@Test
public
void
buildMergedConfigWithAnnotationsAndOverriddenLocations
()
{
Class
<?>
testClass
=
OverriddenLocationsBar
.
class
;
String
[]
expectedLocations
=
new
String
[]
{
"/bar.xml"
}
;
String
[]
expectedLocations
=
array
(
"/bar.xml"
)
;
MergedContextConfiguration
mergedConfig
=
buildMergedContextConfiguration
(
testClass
);
assertMergedConfig
(
mergedConfig
,
testClass
,
expectedLocations
,
EMPTY_CLASS_ARRAY
,
...
...
@@ -195,7 +195,7 @@ public class BootstrapTestUtilsMergedConfigTests extends AbstractContextConfigur
@Test
public
void
buildMergedConfigWithAnnotationsAndOverriddenClasses
()
{
Class
<?>
testClass
=
OverriddenClassesBar
.
class
;
Class
<?>[]
expectedClasses
=
new
Class
<?>[]
{
BarConfig
.
class
}
;
Class
<?>[]
expectedClasses
=
array
(
BarConfig
.
class
)
;
MergedContextConfiguration
mergedConfig
=
buildMergedContextConfiguration
(
testClass
);
assertMergedConfig
(
mergedConfig
,
testClass
,
EMPTY_STRING_ARRAY
,
expectedClasses
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录