NumericFunctions { static public boolean isValid(String[] values) { try { if (values[2].equalsIgnoreCase("randompositivewhole") || values[2].equalsIgnoreCase("randomnegativewhole")) { if (NumberUtils.isDigits(values[3])) { return true; } } if (values[2].equalsIgnoreCase("randompositivefloat") || values[2].equalsIgnoreCase("randomnegativefloat") || values[2].equalsIgnoreCase("mod")) { if (NumberUtils.isDigits(values[3]) && NumberUtils.isDigits(values[4])) { return true; } } if (values[2].equalsIgnoreCase("add") || values[2].equalsIgnoreCase("subtract")) { if (NumberUtils.isCreatable(values[3]) && NumberUtils.isCreatable(values[4])) { for (int i = 5; i < values.length; i++) { if (values[i] != null) { if (!NumberUtils.isCreatable(values[i])) { return false; } } else { return true; } } } } return false; } catch (Exception ex) { return false; } }  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 testIsValid_1() throws Exception { String[] values = new String[] { null, null, "", "" }; boolean result = NumericFunctions.isValid(values); assertEquals(false, result); }
@Test public void testIsValid_2() throws Exception { String[] values = new String[] { null, null, "", "", "" }; boolean result = NumericFunctions.isValid(values); assertEquals(false, result); }
@Test public void testIsValid_3() throws Exception { String[] values = new String[] { null, null, "", "", "", "" }; boolean result = NumericFunctions.isValid(values); assertEquals(false, result); }
@Test public void testIsValid_4() throws Exception { String[] values = new String[] { null, null, "", "", "" }; boolean result = NumericFunctions.isValid(values); assertEquals(false, result); }
@Test public void testIsValid_5() throws Exception { String[] values = new String[] { null, null, "", "", "", "" }; boolean result = NumericFunctions.isValid(values); assertEquals(false, result); }
@Test public void testIsValid_6() throws Exception { String[] values = new String[] { null, null, "", "", "" }; boolean result = NumericFunctions.isValid(values); assertEquals(false, result); }
@Test public void testIsValid_7() throws Exception { String[] values = new String[] { null, null, "", "" }; boolean result = NumericFunctions.isValid(values); assertEquals(false, result); }
@Test public void testIsValid_8() throws Exception { String[] values = new String[] { null, null, "", "", "" }; boolean result = NumericFunctions.isValid(values); assertEquals(false, result); }
@Test public void testIsValid_9() throws Exception { String[] values = new String[] { null, null, "" }; boolean result = NumericFunctions.isValid(values); assertEquals(false, result); }