Skip to content

Commit f7b5d81

Browse files
committed
Better test method name
1 parent 502fc65 commit f7b5d81

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -429,20 +429,14 @@ void testDeprecatedConstructor() {
429429
}
430430

431431
@Test
432-
void testDetermineTypeVariableAssignments() throws NoSuchFieldException {
433-
final ParameterizedType iterableType = (ParameterizedType) getClass().getField("iterable")
434-
.getGenericType();
435-
final Map<TypeVariable<?>, Type> typeVarAssigns = TypeUtils.determineTypeArguments(TreeSet.class,
436-
iterableType);
432+
void testDetermineTypeArguments() throws NoSuchFieldException {
433+
final ParameterizedType iterableType = (ParameterizedType) getClass().getField("iterable").getGenericType();
434+
final Map<TypeVariable<?>, Type> typeVarAssigns = TypeUtils.determineTypeArguments(TreeSet.class, iterableType);
437435
final TypeVariable<?> treeSetTypeVar = TreeSet.class.getTypeParameters()[0];
438436
assertTrue(typeVarAssigns.containsKey(treeSetTypeVar));
439-
assertEquals(iterableType.getActualTypeArguments()[0], typeVarAssigns
440-
.get(treeSetTypeVar));
441-
442-
assertThrows(NullPointerException.class,
443-
() -> TypeUtils.determineTypeArguments(TreeSet.class, null));
444-
assertThrows(NullPointerException.class,
445-
() -> TypeUtils.determineTypeArguments(null, iterableType));
437+
assertEquals(iterableType.getActualTypeArguments()[0], typeVarAssigns.get(treeSetTypeVar));
438+
assertThrows(NullPointerException.class, () -> TypeUtils.determineTypeArguments(TreeSet.class, null));
439+
assertThrows(NullPointerException.class, () -> TypeUtils.determineTypeArguments(null, iterableType));
446440
}
447441

448442
@SuppressWarnings("unlikely-arg-type")

0 commit comments

Comments
 (0)