Skip to content

Commit

Permalink
Replace usages of deprecated RandomStringUtils APIs in KiwiPreconditi…
Browse files Browse the repository at this point in the history
…onsTest (#1197)
  • Loading branch information
sleberknight authored Sep 1, 2024
1 parent 65629d4 commit 1eafa67
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/test/java/org/kiwiproject/base/KiwiPreconditionsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1709,9 +1709,9 @@ void shouldThrow_WhenArgumentIsInstanceOfRestrictedType(Object argument, Class<?

static Stream<Arguments> instanceOfArguments() {
return Stream.of(
Arguments.of(RandomStringUtils.random(5), Object.class),
Arguments.of(RandomStringUtils.random(15), String.class),
Arguments.of(RandomStringUtils.random(10), CharSequence.class),
Arguments.of(RandomStringUtils.secure().next(5), Object.class),
Arguments.of(RandomStringUtils.secure().next(15), String.class),
Arguments.of(RandomStringUtils.secure().next(10), CharSequence.class),
Arguments.of(random().nextLong(), Long.class),
Arguments.of(random().nextInt(), Integer.class),
Arguments.of(random().nextInt(), Number.class),
Expand All @@ -1723,7 +1723,7 @@ static Stream<Arguments> instanceOfArguments() {

static Stream<Arguments> notInstanceOfArguments() {
return Stream.of(
Arguments.of(RandomStringUtils.random(15), Long.class),
Arguments.of(RandomStringUtils.secure().next(15), Long.class),
Arguments.of(random().nextLong(), String.class),
Arguments.of(random().nextInt(), Collection.class),
Arguments.of(Instant.now(), Date.class),
Expand Down

0 comments on commit 1eafa67

Please sign in to comment.