List of usage examples for org.apache.commons.httpclient HostConfiguration getVirtualHost
public String getVirtualHost()
From source file:org.mule.transport.http.MuleHostConfigurationTestCase.java
@SuppressWarnings("deprecation") @Test/*from w w w .j a v a2 s. c om*/ public void testSetHostViaHostAndVirtualHostAndPortAndProtocol() { HostConfiguration hostConfig = createHostConfiguration(); Protocol protocol = Protocol.getProtocol("http"); hostConfig.setHost("www.mulesoft.org", "www.mulesoft.com", 8080, protocol); assertMockSocketFactory(hostConfig); assertEquals("www.mulesoft.org", hostConfig.getHost()); assertEquals(8080, hostConfig.getPort()); assertEquals("www.mulesoft.com", hostConfig.getVirtualHost()); }
From source file:org.mule.transport.http.MuleHostConfigurationTestCase.java
@SuppressWarnings("deprecation") @Test/* ww w . jav a2 s.c o m*/ public void testSetHostViaHostAndVirtualHostAndPortAndProtocolWithDifferentProtocol() throws Exception { new DifferentProtocolTemplate() { protected void doTest() throws Exception { HostConfiguration hostConfig = createHostConfiguration(); Protocol protocol = Protocol.getProtocol("httpx"); hostConfig.setHost("www.mulesoft.org", "www.mulesoft.com", 8080, protocol); assertDefaultSocketFactory(hostConfig); assertEquals("www.mulesoft.org", hostConfig.getHost()); assertEquals(8080, hostConfig.getPort()); assertEquals("www.mulesoft.com", hostConfig.getVirtualHost()); } }.test(); }