NumericFunctions { static public String randomPositiveFloat(int whole, int decimal) { StringBuilder output = new StringBuilder(); output.append(rnd.nextInt(8) + 1); for (int i = 0; i < whole - 1; i++) { output.append(rnd.nextInt(9)); } output.append("."); for (int i = 0; i < decimal; i++) { output.append(rnd.nextInt(9)); } return output.toString(); }  static boolean isValid(String[] values); static String executeFunction(String[] values, Variables variables); static String randomPositiveWhole(int length); static String randomNegativeWhole(int length); static String randomPositiveFloat(int whole, int decimal); static String randomNegativeFloat(int whole, int decimal);  }
@Test public void testRandomPositiveFloat_1() throws Exception { int whole = 1; int decimal = 1; String result = NumericFunctions.randomPositiveFloat(whole, decimal); assertTrue(NumberUtils.isCreatable(result)); }
@Test public void testRandomPositiveFloat_2() throws Exception { int whole = 1; int decimal = 0; String result = NumericFunctions.randomPositiveFloat(whole, decimal); assertTrue(NumberUtils.isCreatable(result)); }