32
32
import org .junit .runner .RunWith ;
33
33
import org .mockito .Mock ;
34
34
import org .mockito .junit .MockitoJUnitRunner ;
35
- import org .springframework .core .GenericTypeResolver ;
36
35
37
36
/**
38
37
* Unit tests for {@link ParameterizedTypeInformation}.
44
43
public class ParameterizedTypeInformationUnitTests {
45
44
46
45
@ Mock ParameterizedType one ;
47
- Class <?> resolvedOne ;
48
46
49
47
@ Before
50
48
public void setUp () {
51
49
when (one .getActualTypeArguments ()).thenReturn (new Type [0 ]);
52
- this .resolvedOne = GenericTypeResolver .resolveType (one , emptyMap ());
53
50
}
54
51
55
52
@ Test
@@ -58,8 +55,8 @@ public void considersTypeInformationsWithDifferingParentsNotEqual() {
58
55
TypeDiscoverer <String > stringParent = new TypeDiscoverer <>(String .class , emptyMap ());
59
56
TypeDiscoverer <Object > objectParent = new TypeDiscoverer <>(Object .class , emptyMap ());
60
57
61
- ParameterizedTypeInformation <Object > first = new ParameterizedTypeInformation <>(one , resolvedOne , stringParent );
62
- ParameterizedTypeInformation <Object > second = new ParameterizedTypeInformation <>(one , resolvedOne , objectParent );
58
+ ParameterizedTypeInformation <Object > first = new ParameterizedTypeInformation <>(one , stringParent );
59
+ ParameterizedTypeInformation <Object > second = new ParameterizedTypeInformation <>(one , objectParent );
63
60
64
61
assertThat (first ).isNotEqualTo (second );
65
62
}
@@ -69,8 +66,8 @@ public void considersTypeInformationsWithSameParentsNotEqual() {
69
66
70
67
TypeDiscoverer <String > stringParent = new TypeDiscoverer <>(String .class , emptyMap ());
71
68
72
- ParameterizedTypeInformation <Object > first = new ParameterizedTypeInformation <>(one , resolvedOne , stringParent );
73
- ParameterizedTypeInformation <Object > second = new ParameterizedTypeInformation <>(one , resolvedOne , stringParent );
69
+ ParameterizedTypeInformation <Object > first = new ParameterizedTypeInformation <>(one , stringParent );
70
+ ParameterizedTypeInformation <Object > second = new ParameterizedTypeInformation <>(one , stringParent );
74
71
75
72
assertThat (first .equals (second )).isTrue ();
76
73
}
0 commit comments