mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-24 18:04:54 +08:00
add test
This commit is contained in:
parent
76e742ec0c
commit
d6355bb241
@ -19,6 +19,7 @@ public class LengthFinder extends TextFinder {
|
||||
* @param length 长度
|
||||
*/
|
||||
public LengthFinder(final int length) {
|
||||
Assert.isTrue(length > 0, "Length must be great than 0");
|
||||
this.length = length;
|
||||
}
|
||||
|
||||
|
15
hutool-core/src/test/java/cn/hutool/core/text/SplitUtilTest.java
Executable file
15
hutool-core/src/test/java/cn/hutool/core/text/SplitUtilTest.java
Executable file
@ -0,0 +1,15 @@
|
||||
package cn.hutool.core.text;
|
||||
|
||||
import cn.hutool.core.text.split.SplitUtil;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class SplitUtilTest {
|
||||
|
||||
@Test
|
||||
public void issueI6FKSITest(){
|
||||
// issue:I6FKSI
|
||||
Assert.assertThrows(IllegalArgumentException.class, () -> SplitUtil.splitByLength("test length 0", 0));
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user