@Test public void testConfigurableShortenLongString() { int maximumLength = 15; String s1 = "string which is really quite long. string which is really quite long. string which is really quite long. string which is really quite long. string which is really quite long. "; String s2 = ShortString.shorten(s1, maximumLength); assertThat(s2.length() <= maximumLength).isTrue(); String s3 = ShortString.shorten(s2, maximumLength); assertThat(s2).isEqualTo(s3); }
public static String shorten(String s) { return shorten(s, MAX_LENGTH); }
ShortString { public static String shorten(String s) { return shorten(s, MAX_LENGTH); } }
ShortString { public static String shorten(String s) { return shorten(s, MAX_LENGTH); } @SuppressWarnings("unused") private  ShortString(); }
ShortString { public static String shorten(String s) { return shorten(s, MAX_LENGTH); } @SuppressWarnings("unused") private  ShortString(); static String shorten(String s); static String shorten(String s, int maxLength); static List<String> shorten(List<String> strings); static List<String> shorten(List<String> strings, int maxLength); }
ShortString { public static String shorten(String s) { return shorten(s, MAX_LENGTH); } @SuppressWarnings("unused") private  ShortString(); static String shorten(String s); static String shorten(String s, int maxLength); static List<String> shorten(List<String> strings); static List<String> shorten(List<String> strings, int maxLength);  }