File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 20
20
import static org .assertj .core .api .Assertions .assertThat ;
21
21
import static org .assertj .core .api .Assertions .assertThatThrownBy ;
22
22
import static org .assertj .core .api .AssertionsForClassTypes .assertThatExceptionOfType ;
23
+ import static org .junit .jupiter .api .Assertions .assertEquals ;
23
24
import java .io .Reader ;
24
25
import java .lang .reflect .Type ;
25
26
import java .util .Arrays ;
@@ -86,6 +87,16 @@ void resolveLastTypeParameterWhenNotSubtype() throws Exception {
86
87
assertThat (last ).isEqualTo (listStringType );
87
88
}
88
89
90
+
91
+ @ Test
92
+ void fake () throws Exception {
93
+ Type context =
94
+ LastTypeParameter .class .getDeclaredField ("PARAMETERIZED_LIST_STRING" ).getGenericType ();
95
+ Type listStringType = LastTypeParameter .class .getDeclaredField ("LIST_STRING" ).getGenericType ();
96
+ Type last = resolveLastTypeParameter (context , Parameterized .class );
97
+ assertEquals (last , listStringType );
98
+ }
99
+
89
100
@ Test
90
101
void lastTypeFromInstance () throws Exception {
91
102
Parameterized <?> instance = new ParameterizedSubtype ();
You can’t perform that action at this time.
0 commit comments