This commit is contained in:
Looly 2021-07-23 10:19:10 +08:00
parent bcd8d104fb
commit e9e01b54bf

View File

@ -41,4 +41,16 @@ public class RandomUtilTest {
final char c = RandomUtil.randomNumber();
Assert.assertTrue(c <= '9');
}
@Test
public void randomIntTest() {
final int c = RandomUtil.randomInt(10, 100);
Assert.assertTrue(c >= 10 && c < 100);
}
@Test
public void randomBytesTest() {
final byte[] c = RandomUtil.randomBytes(10);
Assert.assertNotNull(c);
}
}