Merge branch 'StringUtilsTest_compiler_warnings'
Remove compiler warnings of joinWith tests. Thanks to Pascal Schuhmacher.
This commit is contained in:
commit
a05233f994
|
@ -461,18 +461,18 @@ public class StringUtilsTest {
|
||||||
@Test
|
@Test
|
||||||
public void testJoinWith() {
|
public void testJoinWith() {
|
||||||
assertEquals("", StringUtils.joinWith(",", new Object[0])); // empty array
|
assertEquals("", StringUtils.joinWith(",", new Object[0])); // empty array
|
||||||
assertEquals("", StringUtils.joinWith(",", NULL_ARRAY_LIST));
|
assertEquals("", StringUtils.joinWith(",", (Object[]) NULL_ARRAY_LIST));
|
||||||
assertEquals("null", StringUtils.joinWith(",", NULL_TO_STRING_LIST)); //toString method prints 'null'
|
assertEquals("null", StringUtils.joinWith(",", NULL_TO_STRING_LIST)); //toString method prints 'null'
|
||||||
|
|
||||||
assertEquals("a,b,c", StringUtils.joinWith(",", new String[]{"a", "b", "c"}));
|
assertEquals("a,b,c", StringUtils.joinWith(",", new Object[]{"a", "b", "c"}));
|
||||||
assertEquals(",a,", StringUtils.joinWith(",", new String[]{null, "a", ""}));
|
assertEquals(",a,", StringUtils.joinWith(",", new Object[]{null, "a", ""}));
|
||||||
|
|
||||||
assertEquals("ab", StringUtils.joinWith(null, "a", "b"));
|
assertEquals("ab", StringUtils.joinWith(null, "a", "b"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = IllegalArgumentException.class)
|
@Test(expected = IllegalArgumentException.class)
|
||||||
public void testJoinWithThrowsException() {
|
public void testJoinWithThrowsException() {
|
||||||
StringUtils.joinWith(",", null);
|
StringUtils.joinWith(",", (Object[]) null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue