This commit is contained in:
Looly
2021-10-20 12:34:26 +08:00
parent e258fc1eb9
commit b937969313
5 changed files with 37 additions and 26 deletions

View File

@@ -81,6 +81,16 @@ public class StrUtilTest {
Assert.assertEquals("", split.get(2));
}
@Test(expected = IllegalArgumentException.class)
public void splitNullTest() {
StrUtil.split(null, '.');
}
@Test(expected = IllegalArgumentException.class)
public void splitToArrayNullTest() {
StrUtil.splitToArray(null, '.');
}
@Test
public void splitToLongTest() {
String str = "1,2,3,4, 5";