Ejemplo n.º 1
0
 @Test
 public void calculate_decimal_different() {
   LogicalExpression left = new Literal<Double>(ValueType.DECIMAL, new Double(5));
   LogicalExpression right = new Literal<Double>(ValueType.DECIMAL, new Double(10));
   NotEqual op = new NotEqual(left, right);
   Boolean result = (Boolean) op.execute();
   assertTrue(result);
 }
Ejemplo n.º 2
0
 @Test
 public void calculate_string_different() {
   LogicalExpression left = new Literal<String>(ValueType.TEXT, "joe");
   LogicalExpression right = new Literal<String>(ValueType.TEXT, "alex");
   NotEqual op = new NotEqual(left, right);
   Boolean result = (Boolean) op.execute();
   assertTrue(result);
 }
Ejemplo n.º 3
0
 @Test
 public void calculate_bools_different() {
   LogicalExpression left = new Literal<Boolean>(ValueType.BOOLEAN, true);
   LogicalExpression right = new Literal<Boolean>(ValueType.BOOLEAN, false);
   NotEqual op = new NotEqual(left, right);
   Boolean result = (Boolean) op.execute();
   assertTrue(result);
 }
Ejemplo n.º 4
0
 @Test
 public void calculate_datetime_different() {
   DateTime now = DateTime.now();
   LogicalExpression left = new Literal<DateTime>(ValueType.DATETIME, now);
   LogicalExpression right = new Literal<DateTime>(ValueType.DATETIME, now.minusDays(1));
   NotEqual op = new NotEqual(left, right);
   Boolean result = (Boolean) op.execute();
   assertTrue(result);
 }