Sort members.
This commit is contained in:
parent
b0d9979fb6
commit
d68ca4ab31
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue