Package org.hornetq.core.filter.impl

Examples of org.hornetq.core.filter.impl.Operator.apply()


   {
      // Neg Long
      FilterParserTest.log.trace("parse(-12345 = -1 * 12345)");
      Operator result = (Operator)parser.parse(new SimpleString("-12345 = -1 * 12345"), identifierMap);
      FilterParserTest.log.trace("result -> " + result);
      Boolean b = (Boolean)result.apply();
      Assert.assertTrue("is true", b.booleanValue());

      // Neg Double
      FilterParserTest.log.trace("parse(-1 * 12345.67 = -12345.67)");
      result = (Operator)parser.parse(new SimpleString("-1 * 12345.67 = -12345.67"), identifierMap);
View Full Code Here


      // Neg Double
      FilterParserTest.log.trace("parse(-1 * 12345.67 = -12345.67)");
      result = (Operator)parser.parse(new SimpleString("-1 * 12345.67 = -12345.67"), identifierMap);
      FilterParserTest.log.trace("result -> " + result);
      b = (Boolean)result.apply();
      Assert.assertTrue("is true", b.booleanValue());

      FilterParserTest.log.trace("parse(-(1 * 12345.67) = -12345.67)");
      result = (Operator)parser.parse(new SimpleString("-(1 * 12345.67) = -12345.67"), identifierMap);
      FilterParserTest.log.trace("result -> " + result);
View Full Code Here

      Assert.assertTrue("is true", b.booleanValue());

      FilterParserTest.log.trace("parse(-(1 * 12345.67) = -12345.67)");
      result = (Operator)parser.parse(new SimpleString("-(1 * 12345.67) = -12345.67"), identifierMap);
      FilterParserTest.log.trace("result -> " + result);
      b = (Boolean)result.apply();
      Assert.assertTrue("is true", b.booleanValue());
   }

   public void testPrecedenceNAssoc() throws Exception
   {
View Full Code Here

   public void testPrecedenceNAssoc() throws Exception
   {
      FilterParserTest.log.trace("parse(4 + 2 * 3 / 2 = 7)");
      Operator result = (Operator)parser.parse(new SimpleString("4 + 2 * 3 / 2 = 7"), identifierMap);
      FilterParserTest.log.trace("result -> " + result);
      Boolean b = (Boolean)result.apply();
      Assert.assertTrue("is true", b.booleanValue());

      FilterParserTest.log.trace("parse(4 + ((2 * 3) / 2) = 7)");
      result = (Operator)parser.parse(new SimpleString("4 + ((2 * 3) / 2) = 7"), identifierMap);
      FilterParserTest.log.trace("result -> " + result);
View Full Code Here

      Assert.assertTrue("is true", b.booleanValue());

      FilterParserTest.log.trace("parse(4 + ((2 * 3) / 2) = 7)");
      result = (Operator)parser.parse(new SimpleString("4 + ((2 * 3) / 2) = 7"), identifierMap);
      FilterParserTest.log.trace("result -> " + result);
      b = (Boolean)result.apply();
      Assert.assertTrue("is true", b.booleanValue());

      FilterParserTest.log.trace("parse(4 * -2 / -1 - 4 = 4)");
      result = (Operator)parser.parse(new SimpleString("4 * -2 / -1 - 4 = 4"), identifierMap);
      FilterParserTest.log.trace("result -> " + result);
View Full Code Here

      Assert.assertTrue("is true", b.booleanValue());

      FilterParserTest.log.trace("parse(4 * -2 / -1 - 4 = 4)");
      result = (Operator)parser.parse(new SimpleString("4 * -2 / -1 - 4 = 4"), identifierMap);
      FilterParserTest.log.trace("result -> " + result);
      b = (Boolean)result.apply();
      Assert.assertTrue("is true", b.booleanValue());

      FilterParserTest.log.trace("parse(4 * ((-2 / -1) - 4) = -8)");
      result = (Operator)parser.parse(new SimpleString("4 * ((-2 / -1) - 4) = -8"), identifierMap);
      FilterParserTest.log.trace("result -> " + result);
View Full Code Here

      Assert.assertTrue("is true", b.booleanValue());

      FilterParserTest.log.trace("parse(4 * ((-2 / -1) - 4) = -8)");
      result = (Operator)parser.parse(new SimpleString("4 * ((-2 / -1) - 4) = -8"), identifierMap);
      FilterParserTest.log.trace("result -> " + result);
      b = (Boolean)result.apply();
      Assert.assertTrue("is true", b.booleanValue());
   }

   public void testIds() throws Exception
   {
View Full Code Here

      Identifier d = identifierMap.get(new SimpleString("d"));
      d.setValue(new Long(2));
      Identifier e = identifierMap.get(new SimpleString("e"));
      e.setValue(new Long(7));
      FilterParserTest.log.trace("result -> " + result);
      Boolean bool = (Boolean)result.apply();
      Assert.assertTrue("is true", bool.booleanValue());

   }

   public void testTrueINOperator() throws Exception
View Full Code Here

      Operator result = (Operator)parser.parse(new SimpleString("Status IN ('new', 'cleared', 'acknowledged')"),
                                               identifierMap);
      Identifier a = identifierMap.get(new SimpleString("Status"));
      a.setValue(new SimpleString("new"));
      FilterParserTest.log.trace("result -> " + result);
      Boolean bool = (Boolean)result.apply();
      Assert.assertTrue("is true", bool.booleanValue());
   }

   public void testFalseINOperator() throws Exception
   {
View Full Code Here

      Operator result = (Operator)parser.parse(new SimpleString("Status IN ('new', 'cleared', 'acknowledged')"),
                                               identifierMap);
      Identifier a = identifierMap.get(new SimpleString("Status"));
      a.setValue(new SimpleString("none"));
      FilterParserTest.log.trace("result -> " + result);
      Boolean bool = (Boolean)result.apply();
      Assert.assertTrue("is false", !bool.booleanValue());
   }

   public void testTrueNOTINOperator() throws Exception
   {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.