Exemplo n.º 1
0
 /**
  * This check standard arguments. Should not throw an exception.
  *
  * <p>Argument 1: 1
  *
  * <p>Argument 2: 1
  */
 @Test
 public void testCheckArgs1() {
   List<Argument> args = new ArrayList<Argument>();
   args.add(new Argument(new Double(1), null));
   args.add(new Argument(new Float(1), null));
   try {
     op.setArguments(args);
   } catch (InvalidArgumentsException e) {
     e.printStackTrace();
     fail();
   }
 }
Exemplo n.º 2
0
 /**
  * This checks a positive small number and a negetive small number
  *
  * <p>Test: 0.15 - -0.11
  */
 @Test
 public void testResolve5() {
   List<Argument> args = new ArrayList<Argument>();
   args.add(new Argument(new Double(0.15), null));
   args.add(new Argument(new Float(-0.11), null));
   try {
     op.setArguments(args);
     assertEquals(0.26, op.resolve().toDouble(), FuzzyEquals.TOLERANCE);
   } catch (InvalidArgumentsException e) {
     e.printStackTrace();
     fail();
   } catch (ArgumentCastException e) {
     e.printStackTrace();
     fail();
   }
 }