Examples of ValueExp


Examples of javax.management.ValueExp

   /**
    * Test a Float
    */
   public void testFloatObject() throws Exception
   {
      ValueExp one = Query.value(new Float(10f));
      ValueExp two = Query.value(new Float(20f));
      ValueExp div = Query.value(new Double(2f));
      ValueExp minus = Query.value(new Double(-10f));
      ValueExp mult = Query.value(new Double(200f));
      ValueExp plus = Query.value(new Double(30f));
      equalsTEST(one, two);
      operationTEST(one, two, div, minus, mult, plus);
      comparisonTEST(one, two);
      betweenTEST(one, two, plus);
      attrTEST(new NumberTest(new Float(10f)), Query.attr("Number"), one, two);
View Full Code Here

Examples of javax.management.ValueExp

   /**
    * Test a int
    */
   public void testInteger() throws Exception
   {
      ValueExp one = Query.value(10);
      ValueExp two = Query.value(20);
      ValueExp div = Query.value(2);
      ValueExp minus = Query.value(-10);
      ValueExp mult = Query.value(200);
      ValueExp plus = Query.value(30);
      equalsTEST(one, two);
      operationTEST(one, two, div, minus, mult, plus);
      comparisonTEST(one, two);
      betweenTEST(one, two, plus);
      attrTEST(new NumberTest(10), Query.attr("Number"), one, two);
View Full Code Here

Examples of javax.management.ValueExp

   /**
    * Test a Integer
    */
   public void testIntegerObject() throws Exception
   {
      ValueExp one = Query.value(new Integer(10));
      ValueExp two = Query.value(new Integer(20));
      ValueExp div = Query.value(new Double(2));
      ValueExp minus = Query.value(new Double(-10));
      ValueExp mult = Query.value(new Double(200));
      ValueExp plus = Query.value(new Double(30));
      equalsTEST(one, two);
      operationTEST(one, two, div, minus, mult, plus);
      comparisonTEST(one, two);
      betweenTEST(one, two, plus);
      attrTEST(new NumberTest(new Integer(10)), Query.attr("Number"), one, two);
View Full Code Here

Examples of javax.management.ValueExp

   /**
    * Test a long
    */
   public void testLong() throws Exception
   {
      ValueExp one = Query.value(10l);
      ValueExp two = Query.value(20l);
      ValueExp div = Query.value(2l);
      ValueExp minus = Query.value(-10l);
      ValueExp mult = Query.value(200l);
      ValueExp plus = Query.value(30l);
      equalsTEST(one, two);
      operationTEST(one, two, div, minus, mult, plus);
      comparisonTEST(one, two);
      betweenTEST(one, two, plus);
      attrTEST(new NumberTest(10l), Query.attr("Number"), one, two);
View Full Code Here

Examples of javax.management.ValueExp

   /**
    * Test a Long
    */
   public void testLongObject() throws Exception
   {
      ValueExp one = Query.value(new Long(10l));
      ValueExp two = Query.value(new Long(20l));
      ValueExp div = Query.value(new Double(2l));
      ValueExp minus = Query.value(new Double(-10l));
      ValueExp mult = Query.value(new Double(200l));
      ValueExp plus = Query.value(new Double(30l));
      equalsTEST(one, two);
      operationTEST(one, two, div, minus, mult, plus);
      comparisonTEST(one, two);
      betweenTEST(one, two, plus);
      attrTEST(new NumberTest(new Long(10l)), Query.attr("Number"), one, two);
View Full Code Here

Examples of javax.management.ValueExp

   /**
    * Test a String
    */
   public void testString() throws Exception
   {
      ValueExp one = Query.value("Hello");
      ValueExp two = Query.value("Goodbye");
      ValueExp cat = Query.value("HelloGoodbye");
      ValueExp three = Query.value("ZZZZZZ");
      ValueExp four = Query.value("Hi");
      ValueExp five = Query.value("See ya");
      ValueExp six = Query.value("Laytaz");
      equalsTEST(one, two);
      catTEST(one, two, cat);
      comparisonTEST(two, one);
      betweenTEST(two, one, three);
      attrTEST(new StringTest("Hello"), Query.attr("String"), one, two);
View Full Code Here

Examples of javax.management.ValueExp

      assertTrue(result.apply(null));
   }

   public void testDoubleOperations() throws Exception
   {
      ValueExp value1 = Query.value(new Double(3.0D));
      ValueExp value2 = Query.value(new Double(4.0D));
      ValueExp op = Query.plus(value1, value2);
      QueryExp result = Query.eq(Query.value(7.0D), op);
      assertTrue(result.apply(null));

      op = Query.minus(value1, value2);
      result = Query.eq(Query.value(-1.0D), op);
View Full Code Here

Examples of javax.management.ValueExp

   public void testExceptions() throws Exception
   {
      QueryExp operation = Query.eq(null, null);
      assertTrue(operation.apply(null));

      ValueExp value1 = Query.value(new Integer(3));
      operation = Query.eq(value1, null);
      assertTrue(!operation.apply(null));

      operation = Query.eq(null, value1);
      assertTrue(!operation.apply(null));

      ValueExp value2 = Query.value(new Long(3));
      ValueExp result = Query.plus(value1, value2);
      operation = Query.eq(Query.value(6), result);
      assertTrue(operation.apply(null));

      // Comparing apple and oranges
      ValueExp bvalue1 = Query.value(true);
      operation = Query.eq(bvalue1, value2);
      assertTrue(!operation.apply(null));

      // Adding 2 booleans
      ValueExp bvalue2 = Query.value(true);
      result = Query.plus(bvalue1, bvalue2);
      operation = Query.eq(Query.value(false), result);
      try
      {
         operation.apply(null);
View Full Code Here

Examples of javax.management.ValueExp

      assertTrue(!operation.apply(null));
   }

   public void testNumericals() throws Exception
   {
      ValueExp value1 = Query.value(new Integer(3));
      ValueExp value2 = Query.value(new Long(3));
      QueryExp operation = Query.eq(value1, value2);
      assertTrue(operation.apply(null));

      value1 = Query.value(new Integer(5));
      value2 = Query.value(new Long(4));
View Full Code Here

Examples of javax.management.ValueExp

      assertTrue(operation.apply(null));
   }

   public void testBooleans() throws Exception
   {
      ValueExp value1 = Query.value(true);
      ValueExp value2 = Query.value(false);
      QueryExp operation = Query.eq(value1, value2);
      assertTrue(!operation.apply(null));

      operation = Query.or(Query.eq(value1, value1), Query.eq(value1, value2));
      assertTrue(operation.apply(null));
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.