Code example for Proxy

Methods: address, type

0
	/** 
	 * @tests java.net.Proxy#Proxy(java.net.Proxy.Type, SocketAddress) 
	 */ 
	public void test_ConstructorLjava_net_ProxyLjava_net_SocketAddress_Normal() { 
		// test HTTP type proxy 
		Proxy proxy = new Proxy(Proxy.Type.HTTP, address);
		assertEquals(Proxy.Type.HTTP, proxy.type());
		assertEquals(address, proxy.address());
 
		// test SOCKS type proxy 
		proxy = new Proxy(Proxy.Type.SOCKS, address);
		assertEquals(Proxy.Type.SOCKS, proxy.type());
		assertEquals(address, proxy.address());
 
		// test DIRECT type proxy 
		proxy = Proxy.NO_PROXY;
		assertEquals(Proxy.Type.DIRECT, proxy.type());
		assertNull(proxy.address());
	} 
 
	/**