Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
带水的鱼儿
spring-framework
提交
31b651a1
S
spring-framework
项目概览
带水的鱼儿
/
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,发现更多精彩内容 >>
提交
31b651a1
编写于
8月 08, 2021
作者:
S
Stephane Nicoll
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Polish contribution
See gh-27248
上级
eaf9deed
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
8 addition
and
14 deletion
+8
-14
spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java
.../springframework/beans/AbstractPropertyAccessorTests.java
+7
-6
spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomEditorTests.java
...ingframework/beans/propertyeditors/CustomEditorTests.java
+1
-5
spring-core/src/test/java/org/springframework/util/ObjectUtilsTests.java
.../test/java/org/springframework/util/ObjectUtilsTests.java
+0
-1
spring-jms/src/test/java/org/springframework/jms/listener/adapter/MessageListenerAdapterTests.java
...ork/jms/listener/adapter/MessageListenerAdapterTests.java
+0
-1
spring-jms/src/test/java/org/springframework/jms/support/converter/MappingJackson2MessageConverterTests.java
...pport/converter/MappingJackson2MessageConverterTests.java
+0
-1
未找到文件。
spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java
浏览文件 @
31b651a1
...
...
@@ -357,7 +357,8 @@ public abstract class AbstractPropertyAccessorTests {
AbstractPropertyAccessor
accessor
=
createAccessor
(
target
);
try
{
accessor
.
getPropertyValue
(
"spouse.bla"
);
}
catch
(
NotReadablePropertyException
ex
)
{
}
catch
(
NotReadablePropertyException
ex
)
{
assertThat
(
ex
.
getMessage
().
contains
(
TestBean
.
class
.
getName
())).
isTrue
();
}
}
...
...
@@ -912,12 +913,12 @@ public abstract class AbstractPropertyAccessorTests {
accessor
.
setPropertyValue
(
"intArray"
,
new
int
[]{
4
,
5
,
2
,
3
});
assertThat
(
target
.
intArray
.
length
==
4
).
as
(
"intArray length = 4"
).
isTrue
();
assertThat
(
target
.
intArray
[
0
]
==
4
&&
target
.
intArray
[
1
]
==
5
&&
target
.
intArray
[
2
]
==
2
&&
target
.
intArray
[
3
]
==
3
).
as
(
"correct values"
).
isTrue
();
target
.
intArray
[
2
]
==
2
&&
target
.
intArray
[
3
]
==
3
).
as
(
"correct values"
).
isTrue
();
accessor
.
setPropertyValue
(
"intArray"
,
new
String
[]{
"3"
,
"4"
,
"1"
,
"2"
});
assertThat
(
target
.
intArray
.
length
==
4
).
as
(
"intArray length = 4"
).
isTrue
();
assertThat
(
target
.
intArray
[
0
]
==
4
&&
target
.
intArray
[
1
]
==
5
&&
target
.
intArray
[
2
]
==
2
&&
target
.
intArray
[
3
]
==
3
).
as
(
"correct values"
).
isTrue
();
target
.
intArray
[
2
]
==
2
&&
target
.
intArray
[
3
]
==
3
).
as
(
"correct values"
).
isTrue
();
accessor
.
setPropertyValue
(
"intArray"
,
1
);
assertThat
(
target
.
intArray
.
length
==
1
).
as
(
"intArray length = 4"
).
isTrue
();
...
...
@@ -1002,7 +1003,7 @@ public abstract class AbstractPropertyAccessorTests {
accessor
.
setPropertyValue
(
"array[2]"
,
3
);
assertThat
(
target
.
getArray
()).
hasSize
(
3
);
assertThat
(
target
.
getArray
()[
0
]
==
1
&&
target
.
getArray
()[
1
]
==
0
&&
target
.
getArray
()[
2
]
==
3
).
as
(
"correct values"
).
isTrue
();
target
.
getArray
()[
2
]
==
3
).
as
(
"correct values"
).
isTrue
();
}
@Test
...
...
@@ -1267,7 +1268,7 @@ public abstract class AbstractPropertyAccessorTests {
badValues
.
add
(
"map[key2]"
,
""
);
assertThatExceptionOfType
(
PropertyBatchUpdateException
.
class
).
isThrownBy
(()
->
accessor
.
setPropertyValues
(
badValues
))
.
satisfies
(
ex
->
assertThat
(
ex
.
getPropertyAccessException
(
"map[key2]"
)).
isInstanceOf
(
TypeMismatchException
.
class
));
.
satisfies
(
ex
->
assertThat
(
ex
.
getPropertyAccessException
(
"map[key2]"
)).
isInstanceOf
(
TypeMismatchException
.
class
));
}
@Test
...
...
@@ -1318,7 +1319,7 @@ public abstract class AbstractPropertyAccessorTests {
assertThat
(((
TestBean
)
target
.
getMap
().
get
(
2
)).
getName
()).
isEqualTo
(
"rob"
);
}
@SuppressWarnings
({
"unchecked"
,
"rawtypes"
})
// must work with raw map in this test
@SuppressWarnings
({
"unchecked"
,
"rawtypes"
})
// must work with raw map in this test
@Test
public
void
setRawMapPropertyWithNoEditorRegistered
()
{
IndexedTestBean
target
=
new
IndexedTestBean
();
...
...
spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomEditorTests.java
浏览文件 @
31b651a1
...
...
@@ -16,10 +16,6 @@
package
org.springframework.beans.propertyeditors
;
import
org.junit.jupiter.api.Test
;
import
org.springframework.beans.*
;
import
org.springframework.beans.testfixture.beans.*
;
import
java.beans.PropertyEditor
;
import
java.beans.PropertyEditorSupport
;
import
java.beans.PropertyVetoException
;
...
...
@@ -753,7 +749,7 @@ class CustomEditorTests {
editor
.
setAsText
(
validDate
);
assertThatIllegalArgumentException
().
isThrownBy
(()
->
editor
.
setAsText
(
invalidDate
))
.
withMessageContaining
(
"10"
);
.
withMessageContaining
(
"10"
);
}
@Test
...
...
spring-core/src/test/java/org/springframework/util/ObjectUtilsTests.java
浏览文件 @
31b651a1
...
...
@@ -18,7 +18,6 @@ package org.springframework.util;
import
java.io.IOException
;
import
java.sql.SQLException
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.HashMap
;
import
java.util.HashSet
;
...
...
spring-jms/src/test/java/org/springframework/jms/listener/adapter/MessageListenerAdapterTests.java
浏览文件 @
31b651a1
...
...
@@ -32,7 +32,6 @@ import javax.jms.Session;
import
javax.jms.TextMessage
;
import
org.junit.jupiter.api.Test
;
import
org.mockito.invocation.InvocationOnMock
;
import
org.mockito.stubbing.Answer
;
import
org.springframework.jms.support.converter.MessageConversionException
;
...
...
spring-jms/src/test/java/org/springframework/jms/support/converter/MappingJackson2MessageConverterTests.java
浏览文件 @
31b651a1
...
...
@@ -31,7 +31,6 @@ import javax.jms.TextMessage;
import
com.fasterxml.jackson.annotation.JsonView
;
import
org.junit.jupiter.api.BeforeEach
;
import
org.junit.jupiter.api.Test
;
import
org.mockito.invocation.InvocationOnMock
;
import
org.mockito.stubbing.Answer
;
import
org.springframework.core.MethodParameter
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录