Examples of HttpFetcher


Examples of org.openid4java.util.HttpFetcher

  }

  public void testGuiceNoModule() throws Exception {
    Injector injector = Guice.createInjector();
    ConsumerManager m = injector.getInstance(ConsumerManager.class);
    HttpFetcher fetcher = m.getHttpFetcher();

    assertTrue(fetcher instanceof HttpCache);
    assertEquals(0, fetcher.getDefaultRequestOptions().getMaxRedirects());

    YadisResolver yadis = m.getDiscovery().getYadisResolver();
    fetcher = yadis.getHttpFetcher();

    assertTrue(fetcher instanceof HttpCache);
    assertEquals(10, fetcher.getDefaultRequestOptions().getMaxRedirects());
  }
View Full Code Here

Examples of org.openid4java.util.HttpFetcher

  }

  public void testGuiceInjectedFetcher() throws Exception {
    Injector injector = Guice.createInjector(new TestModule());
    ConsumerManager m = injector.getInstance(ConsumerManager.class);
    HttpFetcher fetcher = m.getHttpFetcher();

    assertTrue(fetcher instanceof TestFetcher);
    assertEquals(0, fetcher.getDefaultRequestOptions().getMaxRedirects());

    YadisResolver yadis = m.getDiscovery().getYadisResolver();
    fetcher = yadis.getHttpFetcher();

    assertTrue(fetcher instanceof TestFetcher);
    assertEquals(10, fetcher.getDefaultRequestOptions().getMaxRedirects());
  }
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.