From d68ca4ab31ed5a8ddbfa1a8ad312704020bb2c7e Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Thu, 22 Jul 2021 13:52:37 -0400 Subject: [PATCH] Sort members. --- .../apache/commons/lang3/ClassUtilsTest.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/test/java/org/apache/commons/lang3/ClassUtilsTest.java b/src/test/java/org/apache/commons/lang3/ClassUtilsTest.java index 010d487cc..13620bf25 100644 --- a/src/test/java/org/apache/commons/lang3/ClassUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/ClassUtilsTest.java @@ -166,19 +166,6 @@ public class ClassUtilsTest { assertEquals("java.lang.String", ClassUtils.getAbbreviatedName(String.class, 20)); } - /** - * Test that in case the required length is larger than the name and thus there is no need for any shortening - * then the returned string object is the same as the one passed as argument. Note, however, that this is - * tested as an internal implementation detail, but it is not a guaranteed feature of the implementation. - */ - @Test - @DisplayName("When the length hint is longer than the actual length then the same String object is returned") - public void test_getAbbreviatedName_TooLongHint(){ - final String className = "java.lang.String"; - Assertions.assertSame(className, ClassUtils.getAbbreviatedName(className, className.length()+1)); - Assertions.assertSame(className, ClassUtils.getAbbreviatedName(className, className.length())); - } - @Test @DisplayName("When the desired length is negative then exception is thrown") public void test_getAbbreviatedName_Class_NegativeLen() { @@ -215,6 +202,19 @@ public class ClassUtilsTest { assertEquals("j.l.String", ClassUtils.getAbbreviatedName("java.lang.String", "j.l.String".length() - 1)); } + /** + * Test that in case the required length is larger than the name and thus there is no need for any shortening + * then the returned string object is the same as the one passed as argument. Note, however, that this is + * tested as an internal implementation detail, but it is not a guaranteed feature of the implementation. + */ + @Test + @DisplayName("When the length hint is longer than the actual length then the same String object is returned") + public void test_getAbbreviatedName_TooLongHint(){ + final String className = "java.lang.String"; + Assertions.assertSame(className, ClassUtils.getAbbreviatedName(className, className.length()+1)); + Assertions.assertSame(className, ClassUtils.getAbbreviatedName(className, className.length())); + } + @Test public void test_getAllInterfaces_Class() { final List list = ClassUtils.getAllInterfaces(CY.class);