File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/test/java/org/apache/ibatis/reflection/factory Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ void createClassThrowsProperErrorMsg() {
62
62
}
63
63
64
64
@ Test
65
- void creatHashMap () {
65
+ void createHashMap () {
66
66
DefaultObjectFactory defaultObjectFactory =new DefaultObjectFactory ();
67
67
Map map = defaultObjectFactory .create (Map .class ,null ,null );
68
68
Assertions .assertTrue (map instanceof HashMap , "Should be HashMap" );
@@ -94,4 +94,14 @@ void createHashSet() {
94
94
Set set = defaultObjectFactory .create (Set .class );
95
95
Assertions .assertTrue (set instanceof HashSet , " set should be HashSet" );
96
96
}
97
+
98
+ @ Test
99
+ void testIsCollection () {
100
+ DefaultObjectFactory defaultObjectFactory = new DefaultObjectFactory ();
101
+ boolean trueTarget = defaultObjectFactory .isCollection (ArrayList .class );
102
+ Assertions .assertTrue (trueTarget ,"ArrayList should be Collection" );
103
+
104
+ boolean falseTarget = defaultObjectFactory .isCollection (HashMap .class );
105
+ Assertions .assertFalse (falseTarget ,"HashMap should't be Collection" );
106
+ }
97
107
}
You can’t perform that action at this time.
0 commit comments