Package com.google.api.ads.adwords.awreporting.proxy

Examples of com.google.api.ads.adwords.awreporting.proxy.JaxWsProxySelector$JaxWsProxyAuthenticator


  /**
   * Tests select(URI) NO_PROXY
   */
  @Test
  public void testSelect_Direct() {
    JaxWsProxySelector ps = new JaxWsProxySelector(ProxySelector.getDefault());
    ProxySelector.setDefault(ps);

    List<Proxy> list = ps.select(testUri);
    assertEquals(list.get(0), Proxy.NO_PROXY);
  }
View Full Code Here


  @Test
  public void testSelect_HTTP() throws UnknownHostException {
    System.getProperties().put(HTTP_PROXY_HOST, "127.0.0.1");
    System.getProperties().put(HTTP_PROXY_PORT, "8888");

    JaxWsProxySelector ps = new JaxWsProxySelector(ProxySelector.getDefault());
    ProxySelector.setDefault(ps);

    List<Proxy> list = ps.select(testUri);

    assertEquals(list.get(0),
        new Proxy(Type.HTTP, new InetSocketAddress(InetAddress.getByName("127.0.0.1"), 8888)));

    System.getProperties().remove(HTTP_PROXY_HOST);
View Full Code Here

  @Test
  public void testSelect_HTTPS() throws UnknownHostException {
    System.getProperties().put(HTTPS_PROXY_HOST, "127.0.0.1");
    System.getProperties().put(HTTPS_PROXY_PORT, "8888");

    JaxWsProxySelector ps = new JaxWsProxySelector(ProxySelector.getDefault());
    ProxySelector.setDefault(ps);

    List<Proxy> list = ps.select(testUri);
    assertEquals(list.get(0),
        new Proxy(Type.HTTP, new InetSocketAddress(InetAddress.getByName("127.0.0.1"), 8888)));

    System.getProperties().remove(HTTPS_PROXY_HOST);
    System.getProperties().remove(HTTPS_PROXY_PORT);
View Full Code Here

  @Test
  public void testSelect_FTP() throws UnknownHostException {
    System.getProperties().put(FTP_PROXY_HOST, "127.0.0.1");
    System.getProperties().put(FTP_PROXY_PORT, "8888");

    JaxWsProxySelector ps = new JaxWsProxySelector(ProxySelector.getDefault());
    ProxySelector.setDefault(ps);

    List<Proxy> list = ps.select(testUri);
    assertEquals(list.get(0),
        new Proxy(Type.HTTP, new InetSocketAddress(InetAddress.getByName("127.0.0.1"), 8888)));

    System.getProperties().remove(FTP_PROXY_HOST);
    System.getProperties().remove(FTP_PROXY_PORT);
View Full Code Here

  @Test
  public void testSelect_Socks() throws UnknownHostException {
    System.getProperties().put(SOCKS_PROXY_HOST, "127.0.0.1");
    System.getProperties().put(SOCKS_PROXY_PORT, "8888");

    JaxWsProxySelector ps = new JaxWsProxySelector(ProxySelector.getDefault());
    ProxySelector.setDefault(ps);

    List<Proxy> list = ps.select(testUri);
    assertEquals(list.get(0),
        new Proxy(Type.SOCKS, new InetSocketAddress(InetAddress.getByName("127.0.0.1"), 8888)));

    System.getProperties().remove(SOCKS_PROXY_HOST);
    System.getProperties().remove(SOCKS_PROXY_PORT);
View Full Code Here

  /**
   * Tests select(URI) IllegalArgumentException
   */
  @Test(expected = IllegalArgumentException.class)
  public void testSelect_IllegalArgumentException() {
    JaxWsProxySelector ps = new JaxWsProxySelector(ProxySelector.getDefault());
    ps.select(null);
  }
View Full Code Here

  /**
   * Tests the connectFailed(URI, SocketAddress, IOException)
   */
  @Test(expected = IllegalArgumentException.class)
  public void testConnectFailed() {
    JaxWsProxySelector ps = new JaxWsProxySelector(ProxySelector.getDefault());
    ps.connectFailed(null, null, null);
  }
View Full Code Here

   * @param args the command line arguments.
   */
  public static void main(String args[]) {

    // Proxy
    JaxWsProxySelector ps = new JaxWsProxySelector(ProxySelector.getDefault());
    ProxySelector.setDefault(ps);

    Options options = createCommandLineOptions();

    boolean errors = false;
View Full Code Here

   * @param args the command line arguments.
   */
  public static void main(String args[]) {

    // Proxy
    JaxWsProxySelector ps = new JaxWsProxySelector(ProxySelector.getDefault());
    ProxySelector.setDefault(ps);

    Options options = createCommandLineOptions();

    boolean errors = false;
View Full Code Here

TOP

Related Classes of com.google.api.ads.adwords.awreporting.proxy.JaxWsProxySelector$JaxWsProxyAuthenticator

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.