Examples of MockEvaluationContext


Examples of org.ocpsoft.rewrite.mock.MockEvaluationContext

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

Examples of org.ocpsoft.rewrite.mock.MockEvaluationContext

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

Examples of org.ocpsoft.rewrite.mock.MockEvaluationContext

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

Examples of org.ocpsoft.rewrite.mock.MockEvaluationContext

      Mockito.when(request.getContextPath())
               .thenReturn("/context");

      rewrite = new HttpInboundRewriteImpl(request, null, null);
      context = new MockEvaluationContext();
      context.put(ParameterValueStore.class, new DefaultParameterValueStore());
      store = new DefaultParameterStore();
      context.put(ParameterStore.class, store);
   }
View Full Code Here

Examples of org.ocpsoft.rewrite.mock.MockEvaluationContext

   }

   @Test
   public void testSchemeMatchesInbound()
   {
      Assert.assertTrue(Scheme.matches("https").evaluate(inbound, new MockEvaluationContext()));
   }
View Full Code Here

Examples of org.ocpsoft.rewrite.mock.MockEvaluationContext

   }

   @Test
   public void testShemeMatchesInboundParameterized()
   {
      MockEvaluationContext context = new MockEvaluationContext();
      Scheme scheme = Scheme.matches("{scheme}");

      ParameterUtils.initialize(context, scheme);

      Assert.assertTrue(scheme.evaluate(inbound, context));
View Full Code Here

Examples of org.ocpsoft.rewrite.mock.MockEvaluationContext

   }

   @Test
   public void testSchemeNotMatchesInbound()
   {
      Assert.assertFalse(Scheme.matches("ftp").evaluate(inbound, new MockEvaluationContext()));
   }
View Full Code Here

Examples of org.ocpsoft.rewrite.mock.MockEvaluationContext

   }

   @Test
   public void testSchemeMatchesOutbound()
   {
      Assert.assertTrue(Scheme.matches("http").evaluate(outbound, new MockEvaluationContext()));
   }
View Full Code Here

Examples of org.ocpsoft.rewrite.mock.MockEvaluationContext

   }

   @Test
   public void testSchemeNotMatchesOutbound()
   {
      Assert.assertFalse(Scheme.matches("scp").evaluate(outbound, new MockEvaluationContext()));
   }
View Full Code Here

Examples of org.ocpsoft.rewrite.mock.MockEvaluationContext

   @Test
   public void testMatchesWithParameters()
   {
      Path path = Path.matches("/application/{seg}");
      MockEvaluationContext context = new MockEvaluationContext();
      ParameterUtils.initialize(context, path);
      Assert.assertTrue(path.evaluate(rewrite, context));
   }
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.