MCPcopy Create free account
hub / github.com/DiUS/java-faker / price

Method price

src/main/java/com/github/javafaker/Commerce.java:48–50  ·  view source on GitHub ↗

Generate a random price between 0.00 and 100.00

()

Source from the content-addressed store, hash-verified

46 * Generate a random price between 0.00 and 100.00
47 */
48 public String price() {
49 return price(0, 100);
50 }
51
52 public String price(double min, double max) {
53 double price = min + (faker.random().nextDouble() * (max - min));

Callers 2

testPriceMethod · 0.80
testPriceMinMaxMethod · 0.80

Calls 2

nextDoubleMethod · 0.80
randomMethod · 0.45

Tested by 2

testPriceMethod · 0.64
testPriceMinMaxMethod · 0.64