Skip to content

Commit

Permalink
added randomBigDecimal function to return random big decimal numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
KaroK365 committed Oct 25, 2024
1 parent 76b7372 commit 1c00eb4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/test/java/dev/nmarulo/depensaapp/FakeTestUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import net.datafaker.Faker;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.ZoneId;

Expand All @@ -12,6 +13,11 @@ public final class FakeTestUtil {
static {
faker = new Faker();
}

public static BigDecimal randomBigDecimal(){
double randomValue = Math.random() * 999 + 1;
return BigDecimal.valueOf(randomValue);
}

public static Integer randomInteger() {
return faker.random()
Expand Down

0 comments on commit 1c00eb4

Please sign in to comment.