From 70883fb132feeff9cccebb025b3dbe426515b41b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20von=20Frantzius?= Date: Tue, 7 Mar 2023 19:50:46 +0100 Subject: [PATCH] #2921 test with fields that only differ by type variable --- .../org/mockitousage/GenericTypeMockTest.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/subprojects/junit-jupiter/src/test/java/org/mockitousage/GenericTypeMockTest.java b/subprojects/junit-jupiter/src/test/java/org/mockitousage/GenericTypeMockTest.java index d150d39d64..cfece7cb84 100644 --- a/subprojects/junit-jupiter/src/test/java/org/mockitousage/GenericTypeMockTest.java +++ b/subprojects/junit-jupiter/src/test/java/org/mockitousage/GenericTypeMockTest.java @@ -261,28 +261,28 @@ void testWithTypeParameterNoMatch() { @Nested public class ClassWithTypeParametersTest { - public class UnderTestWithTypeParameter { + public class UnderTestWithTypeParameters { List t1List; - Set t2Set; + List t2List; } @Mock List stringList; @Mock - Set intSet; + List intList; @InjectMocks - UnderTestWithTypeParameter underTestWithTypeParameter = new UnderTestWithTypeParameter(); + UnderTestWithTypeParameters underTestWithTypeParameters = new UnderTestWithTypeParameters(); @Test void testWithTypeParameters() { assertNotNull(stringList); - assertNotNull(intSet); + assertNotNull(intList); - // verify that can match the type parameters of the class under test - assertEquals(stringList, underTestWithTypeParameter.t1List); - assertEquals(intSet, underTestWithTypeParameter.t2Set); + // verify that we can match the type parameters of the class under test + assertEquals(stringList, underTestWithTypeParameters.t1List); + assertEquals(intList, underTestWithTypeParameters.t2List); } }