11
22package org .scijava .types .inference ;
33
4- import static org .junit .Assert .assertEquals ;
5-
64import java .lang .reflect .ParameterizedType ;
75import java .lang .reflect .Type ;
86import java .lang .reflect .TypeVariable ;
1311import java .util .Map ;
1412import java .util .function .Function ;
1513
16- import org .junit .Test ;
14+ import org .junit .jupiter .api .Assertions ;
15+ import org .junit .jupiter .api .Test ;
1716import org .scijava .types .Any ;
1817import org .scijava .types .Nil ;
1918
@@ -50,7 +49,7 @@ public <T, U extends Comparable<Double>> void testInferFromTypeVar()
5049 TypeVariable <?> typeVarT = (TypeVariable <?>) t ;
5150 expected .put (typeVarT , new TypeMapping (typeVarT , Double .class , false ));
5251
53- assertEquals (expected , typeAssigns );
52+ Assertions . assertEquals (expected , typeAssigns );
5453 }
5554
5655 @ Test
@@ -74,7 +73,7 @@ public <T extends Number> void testInferFromWildcardExtendingClass()
7473 expected .put (typeVarT , new WildcardTypeMapping (typeVarT , mappedWildcard ,
7574 true ));
7675
77- assertEquals (expected , typeAssigns );
76+ Assertions . assertEquals (expected , typeAssigns );
7877 }
7978
8079 @ Test
@@ -95,7 +94,7 @@ public <T extends Number> void testInferFromWildcardExtendingClass()
9594 TypeVariable <?> typeVarT = (TypeVariable <?>) t ;
9695 expected .put (typeVarT , new TypeMapping (typeVarT , Double .class , false ));
9796
98- assertEquals (expected , typeAssigns );
97+ Assertions . assertEquals (expected , typeAssigns );
9998 }
10099
101100 @ Test
@@ -114,7 +113,7 @@ public <T extends Number> void testInferFromWildcardExtendingClass()
114113 Map <TypeVariable <?>, TypeMapping > expected = new HashMap <>();
115114 expected .put (typeVarT , new TypeMapping (typeVarT , Double .class , true ));
116115
117- assertEquals (expected , typeAssigns );
116+ Assertions . assertEquals (expected , typeAssigns );
118117 }
119118
120119 @ Test
@@ -133,7 +132,7 @@ public <T extends Number> void testInferFromWildcardExtendingClass()
133132 Map <TypeVariable <?>, TypeMapping > expected = new HashMap <>();
134133 expected .put (typeVarT , new TypeMapping (typeVarT , Double .class , true ));
135134
136- assertEquals (expected , typeAssigns );
135+ Assertions . assertEquals (expected , typeAssigns );
137136 }
138137
139138 @ Test
@@ -151,7 +150,7 @@ public <O extends Number> void testInferOToAny()
151150 Map <TypeVariable <?>, TypeMapping > expected = new HashMap <>();
152151 expected .put (typeVarO , new TypeMapping (typeVarO , new Any (), true ));
153152
154- assertEquals (expected , typeAssigns );
153+ Assertions . assertEquals (expected , typeAssigns );
155154 }
156155
157156 @ Test
@@ -169,7 +168,7 @@ public <O extends Number> void testInferOToAnyWithClass()
169168 Map <TypeVariable <?>, TypeMapping > expected = new HashMap <>();
170169 expected .put (typeVarO , new TypeMapping (typeVarO , new Any (), true ));
171170
172- assertEquals (expected , typeAssigns );
171+ Assertions . assertEquals (expected , typeAssigns );
173172 }
174173
175174 @ Test
@@ -187,7 +186,7 @@ public <O extends Number> void testInferOToAnyWithInterface()
187186 Map <TypeVariable <?>, TypeMapping > expected = new HashMap <>();
188187 expected .put (typeVarO , new TypeMapping (typeVarO , new Any (), true ));
189188
190- assertEquals (expected , typeAssigns );
189+ Assertions . assertEquals (expected , typeAssigns );
191190 }
192191
193192 @ Test
@@ -205,7 +204,7 @@ public <O extends Number> void testInferOToAnyWithRawType()
205204 Map <TypeVariable <?>, TypeMapping > expected = new HashMap <>();
206205 expected .put (typeVarO , new TypeMapping (typeVarO , new Any (), true ));
207206
208- assertEquals (expected , typeAssigns );
207+ Assertions . assertEquals (expected , typeAssigns );
209208 }
210209
211210 @ Test
@@ -221,7 +220,7 @@ public <O extends RecursiveThing<O>> void testInferRecursiveTypeVar() {
221220 Map <TypeVariable <?>, TypeMapping > expected = new HashMap <>();
222221 expected .put (typeVarO , new TypeMapping (typeVarO , FooThing .class , false ));
223222
224- assertEquals (expected , typeAssigns );
223+ Assertions . assertEquals (expected , typeAssigns );
225224 }
226225
227226 @ Test
@@ -240,7 +239,7 @@ public <T extends Number> void testInferSuperWildcard()
240239 TypeVariable <?> typeVarT = (TypeVariable <?>) new Nil <T >() {}.getType ();
241240 expected .put (typeVarT , new TypeMapping (typeVarT , Number .class , true ));
242241
243- assertEquals (expected , typeAssigns );
242+ Assertions . assertEquals (expected , typeAssigns );
244243 }
245244
246245 @ Test
@@ -260,7 +259,7 @@ public <T extends Number> void testInferSuperWildcard()
260259 TypeVariable <?> typeVarO = (TypeVariable <?>) new Nil <O >() {}.getType ();
261260 expected .put (typeVarO , new TypeMapping (typeVarO , Double .class , true ));
262261
263- assertEquals (expected , typeAssigns );
262+ Assertions . assertEquals (expected , typeAssigns );
264263 }
265264
266265 @ Test
@@ -282,7 +281,7 @@ public <T extends Number> void testInferTypeVarInconsistentMapping()
282281 Map <TypeVariable <?>, TypeMapping > expected = new HashMap <>();
283282 expected .put (typeVarT , new TypeMapping (typeVarT , Number .class , true ));
284283
285- assertEquals (expected , typeAssigns );
284+ Assertions . assertEquals (expected , typeAssigns );
286285 }
287286
288287 @ Test
@@ -305,7 +304,7 @@ public <T extends Number> void testInferWildcardAndClass()
305304 TypeVariable <?> typeVarT = (TypeVariable <?>) t .getType ();
306305 expected .put (typeVarT , new TypeMapping (typeVarT , Number .class , true ));
307306
308- assertEquals (expected , typeAssigns );
307+ Assertions . assertEquals (expected , typeAssigns );
309308 }
310309
311310 @ Test
@@ -332,7 +331,7 @@ public <I, O> void testSupertypeTypeInference()
332331 .getActualTypeArguments ()[0 ];
333332 expected .put (typeVarO , new TypeMapping (typeVarO , Double .class , false ));
334333
335- assertEquals (typeAssigns , expected );
334+ Assertions . assertEquals (typeAssigns , expected );
336335 }
337336
338337 @ Test
@@ -354,7 +353,7 @@ public <T> void testWildcardTypeInference() throws TypeInferenceException {
354353 TypeVariable <?> typeVar = (TypeVariable <?>) t ;
355354 expected .put (typeVar , new TypeMapping (typeVar , Number .class , true ));
356355
357- assertEquals (expected , typeAssigns );
356+ Assertions . assertEquals (expected , typeAssigns );
358357
359358 final Type [] types2 = { t , t };
360359 final Type listWildcardNumber = new Nil <List <? extends Number >>() {}
@@ -377,7 +376,7 @@ public <T> void testWildcardTypeInference() throws TypeInferenceException {
377376 TypeVariable <?> typeVar2 = (TypeVariable <?>) t ;
378377 expected2 .put (typeVar2 , new TypeMapping (typeVar , Number .class , true ));
379378
380- assertEquals (expected2 , typeAssigns2 );
379+ Assertions . assertEquals (expected2 , typeAssigns2 );
381380 }
382381
383382}
0 commit comments