Merge branch 'StringUtilsTest_compiler_warnings'

Remove compiler warnings of joinWith tests. Thanks to Pascal Schuhmacher.
This commit is contained in:
Benedikt Ritter 2015-05-07 19:39:56 +02:00
commit a05233f994
1 changed files with 4 additions and 4 deletions

View File

@ -461,18 +461,18 @@ public class StringUtilsTest {
@Test
public void testJoinWith() {
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("a,b,c", StringUtils.joinWith(",", new String[]{"a", "b", "c"}));
assertEquals(",a,", StringUtils.joinWith(",", new String[]{null, "a", ""}));
assertEquals("a,b,c", StringUtils.joinWith(",", new Object[]{"a", "b", "c"}));
assertEquals(",a,", StringUtils.joinWith(",", new Object[]{null, "a", ""}));
assertEquals("ab", StringUtils.joinWith(null, "a", "b"));
}
@Test(expected = IllegalArgumentException.class)
public void testJoinWithThrowsException() {
StringUtils.joinWith(",", null);
StringUtils.joinWith(",", (Object[]) null);
}