Package org.ocpsoft.rewrite.mock

Examples of org.ocpsoft.rewrite.mock.MockRewrite


   }

   @Before
   public void before()
   {
      event = new MockRewrite();
      context = new MockEvaluationContext();
      context.put(ParameterStore.class, new DefaultParameterStore());
      context.put(ParameterValueStore.class, new DefaultParameterValueStore());
   }
View Full Code Here


   }

   @Test
   public void testDoesNotMatchNonHttpRewrites()
   {
      Assert.assertFalse(Query.matches(".*").evaluate(new MockRewrite(), context));
   }
View Full Code Here

   }

   @Test
   public void testDoesNotMatchNonHttpRewrites()
   {
      Assert.assertFalse(Path.matches("/blah").evaluate(new MockRewrite(), new MockEvaluationContext()));
   }
View Full Code Here

   }

   @Test
   public void testDoesNotMatchNonHttpRewrites()
   {
      Assert.assertFalse(Query.matches(".*").evaluate(new MockRewrite(), context));
   }
View Full Code Here

         {
            return time != null;
         }
      });

      Assert.assertTrue(jodaTime.evaluate(new MockRewrite(), new MockEvaluationContext()));
   }
View Full Code Here

         {
            return false;
         }
      });

      Assert.assertFalse(jodaTime.evaluate(new MockRewrite(), new MockEvaluationContext()));
   }
View Full Code Here

      Header header = Header.exists("Accept-Charset");

      ParameterStore parameters = new DefaultParameterStore();
      ParameterUtils.initialize(parameters, header);

      Assert.assertFalse(header.evaluate(new MockRewrite(), new MockEvaluationContext()));
   }
View Full Code Here

   }

   @Test
   public void testDoesNotMatchNonHttpRewrites()
   {
      Assert.assertFalse(URL.matches("/blah").evaluate(new MockRewrite(), new MockEvaluationContext()));
   }
View Full Code Here

   }

   @Test
   public void testDoesNotMatchNonHttpRewrites()
   {
      Assert.assertFalse(RequestParameter.exists("foo").evaluate(new MockRewrite(), new MockEvaluationContext()));
   }
View Full Code Here

TOP

Related Classes of org.ocpsoft.rewrite.mock.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.