Skip to content

Commit

Permalink
Implemented randomBigDecimal function using datafaker which generates…
Browse files Browse the repository at this point in the history
… random number between 1 to 1000 upto two decimal places.
  • Loading branch information
KaroK365 committed Oct 26, 2024
1 parent 863c81b commit 795148c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/test/java/dev/nmarulo/depensaapp/FakeTestUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public final class FakeTestUtil {
}

public static BigDecimal randomBigDecimal(){
double randomValue = Math.random() * 999 + 1;
double randomValue = faker.number().randomDouble(2, 1, 1000);
return BigDecimal.valueOf(randomValue);
}

Expand Down

0 comments on commit 795148c

Please sign in to comment.