MonetaryFunctions { public static String executeFunction(String[] values) { try { if (values[2].equalsIgnoreCase("randompositive")) return MonetaryFunctions.randomPositiveMonetary(Integer.valueOf(values[3])); else if (values[2].equalsIgnoreCase("randomnegative")) return MonetaryFunctions.randomNegativeMonetary(Integer.valueOf(values[3])); return ""; } catch (Exception ex) { return ""; } }  static boolean isValid(String[] values); static String executeFunction(String[] values);  }
@Test public void testExecuteFunction_1() throws Exception { String[] values = new String[] { null, null, null, "" }; String result = MonetaryFunctions.executeFunction(values); assertEquals("", result); }
@Test public void testExecuteFunction_2() throws Exception { String[] values = new String[] { null, null, "", "" }; String result = MonetaryFunctions.executeFunction(values); assertEquals("", result); }
@Test public void testExecuteFunction_3() throws Exception { String[] values = new String[] { null, null, "" }; String result = MonetaryFunctions.executeFunction(values); assertEquals("", result); }
@Test public void testExecuteFunction_4() throws Exception { String[] values = new String[] { null, null, null, "" }; String result = MonetaryFunctions.executeFunction(values); assertEquals("", result); }
@Test public void testExecuteFunction_5() throws Exception { String[] values = new String[] { null, null, "", "" }; String result = MonetaryFunctions.executeFunction(values); assertEquals("", result); }