Skip to content

Commit 5aa9389

Browse files
author
eugenp
committed
minor testing work
1 parent df385e0 commit 5aa9389

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

‎core-java/src/test/java/org/baeldung/java/CoreJavaRandomUnitTest.java‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ public void givenUsingPlainJava_whenGeneratingRandomLongUnbounded_thenCorrect()
1717
System.out.println(generatedLong);
1818
}
1919

20+
@Test
21+
public void givenUsingApacheCommons_whenGeneratingRandomLongUnbounded_thenCorrect() {
22+
final long generatedLong = new RandomDataGenerator().getRandomGenerator().nextLong();
23+
24+
System.out.println(generatedLong);
25+
}
26+
2027
@Test
2128
public void givenUsingPlainJava_whenGeneratingRandomLongBounded_thenCorrect() {
2229
final long leftLimit = 1L;
@@ -53,6 +60,13 @@ public void givenUsingPlainJava_whenGeneratingRandomIntegerBounded_thenCorrect()
5360
System.out.println(generatedInteger);
5461
}
5562

63+
@Test
64+
public void givenUsingApache_whenGeneratingRandomIntegerUnbounded_thenCorrect() {
65+
final Integer generatedInteger = new RandomDataGenerator().getRandomGenerator().nextInt();
66+
67+
System.out.println(generatedInteger);
68+
}
69+
5670
@Test
5771
public void givenUsingApache_whenGeneratingRandomIntegerBounded_thenCorrect() {
5872
final int leftLimit = 1;
@@ -71,6 +85,13 @@ public void givenUsingPlainJava_whenGeneratingRandomFloatUnbouned_thenCorrect()
7185
System.out.println(generatedFloat);
7286
}
7387

88+
@Test
89+
public void givenUsingApache_whenGeneratingRandomFloatUnbounded_thenCorrect() {
90+
final float generatedFloat = new RandomDataGenerator().getRandomGenerator().nextFloat();
91+
92+
System.out.println(generatedFloat);
93+
}
94+
7495
@Test
7596
public void givenUsingPlainJava_whenGeneratingRandomFloatBouned_thenCorrect() {
7697
final float leftLimit = 1F;

0 commit comments

Comments
 (0)