Package org.ocpsoft.rewrite.test

Examples of org.ocpsoft.rewrite.test.MockRewrite


   }

   @Test
   public void testTrueAndFalseIsFalse()
   {
      Assert.assertFalse(And.all(new True(), new False()).evaluate(new MockRewrite(), null));
   }
View Full Code Here


   }

   @Test
   public void testFalseAndFalseIsFalse()
   {
      Assert.assertFalse(And.all(new False(), new False()).evaluate(new MockRewrite(), null));
   }
View Full Code Here

   @Test
   public void testFlattensNestedAnds() throws Exception
   {
      And and = And.all(new True(), And.all(new True(), new False()));
      Assert.assertEquals(3, and.getConditions().size());
      Assert.assertFalse(and.evaluate(new MockRewrite(), null));
      Assert.assertTrue(and.getConditions().get(0) instanceof True);
      Assert.assertTrue(and.getConditions().get(1) instanceof True);
      Assert.assertTrue(and.getConditions().get(2) instanceof False);
   }
View Full Code Here

   @Test
   public void testNotInboundReturnsFalse()
   {
      Condition condition = Direction.isInbound();
      Assert.assertFalse(condition.evaluate(new MockRewrite(), new MockEvaluationContext()));
   }
View Full Code Here

   @Test
   public void testNotOutboundReturnsFalse()
   {
      Condition condition = Direction.isOutbound();
      Assert.assertFalse(condition.evaluate(new MockRewrite(), new MockEvaluationContext()));
   }
View Full Code Here

TOP

Related Classes of org.ocpsoft.rewrite.test.MockRewrite

Copyright © 2018 www.massapicom. 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.