This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git


The following commit(s) were added to refs/heads/master by this push:
     new 9e3964109 Better test method names
9e3964109 is described below

commit 9e3964109987e5fddf95f5dec0325f686cd65a03
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Tue Jul 11 17:27:19 2023 -0400

    Better test method names
---
 .../commons/lang3/reflect/TypeUtilsTest.java       | 62 +++++++++++-----------
 1 file changed, 31 insertions(+), 31 deletions(-)

diff --git a/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java 
b/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
index f5407d722..b5c38d09e 100644
--- a/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
@@ -249,6 +249,36 @@ public class TypeUtilsTest<B> extends AbstractLangTest {
             final List<? super String>[] list13) {
     }
 
+    @Test
+    public void test_LANG_1114() throws Exception {
+        final Type nonWildcardType = 
getClass().getDeclaredField("wildcardComparable").getGenericType();
+        final Type wildcardType = ((ParameterizedType) 
nonWildcardType).getActualTypeArguments()[0];
+
+        assertFalse(TypeUtils.equals(wildcardType, nonWildcardType));
+        assertFalse(TypeUtils.equals(nonWildcardType, wildcardType));
+    }
+
+    @Test
+    public void test_LANG_1190() throws Exception {
+        final Type fromType = 
ClassWithSuperClassWithGenericType.class.getDeclaredMethod("methodWithGenericReturnType").getGenericReturnType();
+        final Type failingToType = 
TypeUtils.wildcardType().withLowerBounds(ClassWithSuperClassWithGenericType.class).build();
+
+        assertTrue(TypeUtils.isAssignable(fromType, failingToType));
+    }
+
+    @Test
+    public void test_LANG_1348() throws Exception {
+        final Method method = Enum.class.getMethod("valueOf", Class.class, 
String.class);
+        assertEquals("T extends java.lang.Enum<T>", 
TypeUtils.toString(method.getGenericReturnType()));
+    }
+
+    @Test
+    public void test_LANG_820() {
+        final Type[] typeArray = {String.class, String.class};
+        final Type[] expectedArray = {String.class};
+        assertArrayEquals(expectedArray, 
TypeUtils.normalizeUpperBounds(typeArray));
+    }
+
     @Test
     public void testContainsTypeVariables() throws Exception {
         
assertFalse(TypeUtils.containsTypeVariables(Test1.class.getMethod("m0").getGenericReturnType()));
@@ -900,36 +930,6 @@ public class TypeUtilsTest<B> extends AbstractLangTest {
         assertFalse(TypeUtils.isInstance(1, uriComparableType));
     }
 
-    @Test
-    public void testLang1114() throws Exception {
-        final Type nonWildcardType = 
getClass().getDeclaredField("wildcardComparable").getGenericType();
-        final Type wildcardType = ((ParameterizedType) 
nonWildcardType).getActualTypeArguments()[0];
-
-        assertFalse(TypeUtils.equals(wildcardType, nonWildcardType));
-        assertFalse(TypeUtils.equals(nonWildcardType, wildcardType));
-    }
-
-    @Test
-    public void testLANG1190() throws Exception {
-        final Type fromType = 
ClassWithSuperClassWithGenericType.class.getDeclaredMethod("methodWithGenericReturnType").getGenericReturnType();
-        final Type failingToType = 
TypeUtils.wildcardType().withLowerBounds(ClassWithSuperClassWithGenericType.class).build();
-
-        assertTrue(TypeUtils.isAssignable(fromType, failingToType));
-    }
-
-    @Test
-    public void testLANG1348() throws Exception {
-        final Method method = Enum.class.getMethod("valueOf", Class.class, 
String.class);
-        assertEquals("T extends java.lang.Enum<T>", 
TypeUtils.toString(method.getGenericReturnType()));
-    }
-
-    @Test
-    public void testLang820() {
-        final Type[] typeArray = {String.class, String.class};
-        final Type[] expectedArray = {String.class};
-        assertArrayEquals(expectedArray, 
TypeUtils.normalizeUpperBounds(typeArray));
-    }
-
     @Test
     public void testLowerBoundedWildcardType() {
        final WildcardType lowerBounded = 
TypeUtils.wildcardType().withLowerBounds(java.sql.Date.class).build();
@@ -1000,7 +1000,7 @@ public class TypeUtilsTest<B> extends AbstractLangTest {
     }
 
     @Test
-    public void testToStringLang1311() {
+    public void testToString_LANG_1311() {
         assertEquals("int[]", TypeUtils.toString(int[].class));
         assertEquals("java.lang.Integer[]", 
TypeUtils.toString(Integer[].class));
         final Field stringListField = FieldUtils.getDeclaredField(getClass(), 
"stringListArray");

Reply via email to