Package org.mokai.connector.http

Examples of org.mokai.connector.http.HttpConnector.configure()


    HttpConfiguration configuration = new HttpConfiguration();
    configuration.setUrl("http://invalid:port/");

    HttpConnector connector = new HttpConnector(configuration);
    connector.configure();
  }

  @Test(expectedExceptions=IllegalArgumentException.class)
  public void shouldNotProcessIfUrlIsInvalid() throws Exception {
    MockRequestHandler mockHandler = new MockRequestHandler(HttpStatus.SC_OK);
View Full Code Here


    testServer.register("/", mockHandler);

    HttpConfiguration configuration = new HttpConfiguration();

    HttpConnector connector = new HttpConnector(configuration);
    connector.configure();

  }

  @Test(expectedExceptions=IllegalArgumentException.class)
  public void shouldNotProcessWithNullUrl() throws Exception {
View Full Code Here

    HttpConfiguration configuration = new HttpConfiguration();
    configuration.setUrl("http://" + getHost() + ":" + getPort() + "/");
    configuration.setMethod("UNKNOWN");

    HttpConnector connector = new HttpConnector(configuration);
    connector.configure();

  }

  @Test(expectedExceptions=IllegalArgumentException.class)
  public void shouldNotProcessUnknownHttpMethod() throws Exception {
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.