Package com.google.code.http4j.impl

Examples of com.google.code.http4j.impl.BasicHost


  private Host host;

  @BeforeClass
  public void beforeClass() throws IOException {
    host = new BasicHost("www.google.com");
    connection = createConnection();
  }
View Full Code Here


  private Connection connection2;

  @BeforeClass
  public void beforeClass() {
    manager = new ConnectionPool();
    host = new BasicHost("www.google.com");
  }
View Full Code Here

  private Host host;

  @BeforeClass
  public void beforeClass() throws IOException {
    host = new BasicHost("www.google.com");
    connection = createConnection();
  }
View Full Code Here

  private Connection connection2;

  @BeforeClass
  public void beforeClass() {
    manager = new ConnectionPool();
    host = new BasicHost("www.google.com");
  }
View Full Code Here

  }
 
  @Test
  public void getHost() throws MalformedURLException, URISyntaxException {
    Request request = createRequest("http://www.google.com");
    Assert.assertEquals(request.getHost(), new BasicHost("http", "www.google.com", -1));
  }
View Full Code Here

  private Host specialHttps;
 
  @BeforeClass
  public void beforeClass() {
    host = "www.google.com";
    googleHttp = new BasicHost("http", host, 80);
    googleHttps = new BasicHost("https", host, 443);
    specialHttp = new BasicHost("http", host, 8080);
    specialHttps = new BasicHost("https", host, 993);
  }
View Full Code Here

    construct_with_error("http", "www.google.com", -3);
  }
 
  private void construct_with_error(String protocol, String host, int port) {
    try {
      new BasicHost(protocol, host, port);
      Assert.fail("Exception should be thrown, but not.");
    } catch(IllegalArgumentException e) {
      // OK
    }
  }
View Full Code Here

  }
 
  @Test
  public void equals_object() {
    Assert.assertTrue(googleHttp.equals(googleHttp));
    Assert.assertTrue(googleHttp.equals(new BasicHost("http", "www.google.com", 80)));
    Assert.assertFalse(googleHttp.equals(new Object()));
    Assert.assertFalse(googleHttp.equals(googleHttps));
    Assert.assertFalse(googleHttp.equals(null));
  }
View Full Code Here

    Assert.assertFalse(googleHttp.equals(null));
  }
 
  @Test
  public void _hashCode() {
    Assert.assertEquals(googleHttp.hashCode(), new BasicHost("http", "www.google.com", 80).hashCode());
  }
View Full Code Here

  private Host specialHttps;
 
  @BeforeClass
  public void beforeClass() {
    host = "www.google.com";
    googleHttp = new BasicHost("http", host, 80);
    googleHttps = new BasicHost("https", host, 443);
    specialHttp = new BasicHost("http", host, 8080);
    specialHttps = new BasicHost("https", host, 993);
  }
View Full Code Here

TOP

Related Classes of com.google.code.http4j.impl.BasicHost

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.