修复RandomUtil.randomStringWithoutStr方法问题

This commit is contained in:
Looly
2024-04-17 15:30:49 +08:00
parent 3fc15c4f24
commit ce6c2ae15b
2 changed files with 17 additions and 5 deletions

View File

@@ -76,11 +76,9 @@ public class RandomUtilTest {
}
@Test
@Disabled
public void randomStringWithoutStrTest() {
public void randomStringLowerWithoutStrTest() {
for (int i = 0; i < 100; i++) {
final String s = RandomUtil.randomStringWithoutStr(8, "0IPOL");
System.out.println(s);
final String s = RandomUtil.randomStringLowerWithoutStr(8, "0IPOL");
for (final char c : "0IPOL".toCharArray()) {
Assertions.assertFalse(s.contains((String.valueOf(c).toLowerCase(Locale.ROOT))));
}