mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-08-18 20:38:02 +08:00
fix RandomUtil
This commit is contained in:
@@ -3,9 +3,6 @@ package cn.hutool.core.util;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import cn.hutool.core.util.CharsetUtil;
|
||||
import cn.hutool.core.util.HexUtil;
|
||||
|
||||
/**
|
||||
* HexUtil单元测试
|
||||
* @author Looly
|
||||
|
@@ -35,4 +35,10 @@ public class RandomUtilTest {
|
||||
public void randomBooleanTest() {
|
||||
Console.log(RandomUtil.randomBoolean());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void randomNumberTest() {
|
||||
final char c = RandomUtil.randomNumber();
|
||||
Assert.assertTrue(c <= '9');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user