Examples of RewriterConfiguration


Examples of net.sourceforge.urlrewriter4j.core.configuration.RewriterConfiguration

  private RewriterConfiguration getConfig() {
    return new RewriterConfiguration();
  }

  public void testAddressConditionPositive() throws Exception {
    RewriterConfiguration oConfiguration = getConfig();

    ConditionalAction oAction = new ConditionalAction();
    oAction.getConditions().add(new AddressCondition("127.0.0.1"));
    oAction.getActions().add(new NotImplementedAction());

    oConfiguration.getRules().add(oAction);

    MockContextFacade oMockFacade = new MockContextFacade("/", ".",
        "GET", new URL("http://localhost/test.aspx"));
    oMockFacade.addServerVariable("REMOTE_ADDR", "127.0.0.1");
View Full Code Here

Examples of net.sourceforge.urlrewriter4j.core.configuration.RewriterConfiguration

    oMockFacade.expectStatusCode(501);
    oMockFacade.expectLocation("/test.aspx");
  }

  public void testAddressConditionNegative() throws Exception {
    RewriterConfiguration oConfiguration = getConfig();

    ConditionalAction oAction = new ConditionalAction();
    oAction.getConditions().add(new AddressCondition("127.0.0.1"));
    oAction.getActions().add(new NotImplementedAction());

    oConfiguration.getRules().add(oAction);

    MockContextFacade oMockFacade = new MockContextFacade("/", ".",
        "GET", new URL("http://localhost/test.aspx"));
    oMockFacade.addServerVariable("REMOTE_ADDR", "10.0.0.1");
View Full Code Here

Examples of net.sourceforge.urlrewriter4j.core.configuration.RewriterConfiguration

    oMockFacade.expectStatusCode(200);
    oMockFacade.expectLocation("/test.aspx");
  }

  public void testExistsConditionPositive() throws Exception {
    RewriterConfiguration oConfiguration = getConfig();

    ConditionalAction oAction = new ConditionalAction();
    oAction.getConditions().add(new ExistsCondition("/foo.aspx"));
    oAction.getActions().add(new NotImplementedAction());

    oConfiguration.getRules().add(oAction);

    MockContextFacade oMockFacade = new MockContextFacade("/", "src/test/resources",
        "GET", new URL("http://localhost/test.aspx"));

    RewriterEngine oEngine = new RewriterEngine(oConfiguration);
View Full Code Here

Examples of net.sourceforge.urlrewriter4j.core.configuration.RewriterConfiguration

    oMockFacade.expectStatusCode(501);
    oMockFacade.expectLocation("/test.aspx");
  }

  public void testExistsConditionNegative() throws Exception {
    RewriterConfiguration oConfiguration = getConfig();

    ConditionalAction oAction = new ConditionalAction();
    oAction.getConditions().add(new ExistsCondition("/foo1.aspx"));
    oAction.getActions().add(new NotImplementedAction());

    oConfiguration.getRules().add(oAction);

    MockContextFacade oMockFacade = new MockContextFacade("/", "src/test/resources",
        "GET", new URL("http://localhost/test.aspx"));

    RewriterEngine oEngine = new RewriterEngine(oConfiguration);
View Full Code Here

Examples of net.sourceforge.urlrewriter4j.core.configuration.RewriterConfiguration

    oMockFacade.expectStatusCode(200);
    oMockFacade.expectLocation("/test.aspx");
  }

  public void testUrlMatchConditionPositive() throws Exception {
    RewriterConfiguration oConfiguration = getConfig();

    ConditionalAction oAction = new ConditionalAction();
    oAction.getConditions().add(new UrlMatchCondition("/test.aspx"));
    oAction.getActions().add(new NotImplementedAction());

    oConfiguration.getRules().add(oAction);

    MockContextFacade oMockFacade = new MockContextFacade("/", ".",
        "GET", new URL("http://localhost/test.aspx"));

    RewriterEngine oEngine = new RewriterEngine(oConfiguration);
View Full Code Here

Examples of net.sourceforge.urlrewriter4j.core.configuration.RewriterConfiguration

    oMockFacade.expectStatusCode(501);
    oMockFacade.expectLocation("/test.aspx");
  }

  public void testUrlMatchConditionNegative() throws Exception {
    RewriterConfiguration oConfiguration = getConfig();

    ConditionalAction oAction = new ConditionalAction();
    oAction.getConditions().add(new UrlMatchCondition("/foo1.aspx"));
    oAction.getActions().add(new NotImplementedAction());

    oConfiguration.getRules().add(oAction);

    MockContextFacade oMockFacade = new MockContextFacade("/", ".",
        "GET", new URL("http://localhost/test.aspx"));

    RewriterEngine oEngine = new RewriterEngine(oConfiguration);
View Full Code Here

Examples of net.sourceforge.urlrewriter4j.core.configuration.RewriterConfiguration

  private RewriterConfiguration mConfiguration;
 
  @Override
  protected void setUp() throws Exception {
    //BasicConfigurator.configure();
    mConfiguration = new RewriterConfiguration();
    mEngine = new RewriterEngine(mConfiguration);
  }
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.