mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add methods
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -18,12 +18,21 @@ public class AssertTest {
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void isTrueTest() {
|
||||
int i = 0;
|
||||
//noinspection ConstantConditions
|
||||
cn.hutool.core.lang.Assert.isTrue(i > 0, IllegalArgumentException::new);
|
||||
}
|
||||
|
||||
@Test(expected = IndexOutOfBoundsException.class)
|
||||
public void isTrueTest2() {
|
||||
int i = -1;
|
||||
//noinspection ConstantConditions
|
||||
cn.hutool.core.lang.Assert.isTrue(i >= 0, IndexOutOfBoundsException::new);
|
||||
}
|
||||
|
||||
@Test(expected = IndexOutOfBoundsException.class)
|
||||
public void isTrueTest3() {
|
||||
int i = -1;
|
||||
//noinspection ConstantConditions
|
||||
Assert.isTrue(i > 0, ()-> new IndexOutOfBoundsException("relation message to return"));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user