@SuppressWarnings("unused") @Test public void testProvideClientAuthenticationHandlers_1() throws Exception { final OAuth2HandlerModule fixture = new OAuth2HandlerModule(); final BasicAuthenticationHandler basicAuthenticationHandler = new BasicAuthenticationHandler(); final StandardAuthenticationHandler standardAuthenticationHandler = new StandardAuthenticationHandler(); final List<ClientAuthenticationHandler> result = OAuth2HandlerModule .provideClientAuthenticationHandlers(basicAuthenticationHandler, standardAuthenticationHandler); Assert.assertNotNull(result); Assert.assertEquals(2, result.size()); }
@Test @SuppressWarnings({ "unchecked", "unused" }) public void testProvideGrantRequestHandlers_1() throws Exception { final OAuth2HandlerModule fixture = new OAuth2HandlerModule(); final ClientCredentialsGrantTypeHandler clientCredentialsGrantTypeHandler = new ClientCredentialsGrantTypeHandler( EasyMock.createNiceMock(List.class)); final CodeGrantTypeHandler codeGrantTypeHandler = new CodeGrantTypeHandler(); final List<GrantRequestHandler> result = OAuth2HandlerModule.provideGrantRequestHandlers( clientCredentialsGrantTypeHandler, codeGrantTypeHandler); Assert.assertNotNull(result); Assert.assertEquals(2, result.size()); }
@Test @SuppressWarnings({ "unchecked", "unused" }) public void testProvideTokenEndpointResponseHandlers_1() throws Exception { final OAuth2HandlerModule fixture = new OAuth2HandlerModule(); final TokenAuthorizationResponseHandler tokenAuthorizationResponseHandler = new TokenAuthorizationResponseHandler( EasyMock.createNiceMock(Provider.class), EasyMock.createNiceMock(OAuth2Store.class)); final List<TokenEndpointResponseHandler> result = OAuth2HandlerModule .provideTokenEndpointResponseHandlers(tokenAuthorizationResponseHandler); Assert.assertNotNull(result); Assert.assertEquals(1, result.size()); }
@SuppressWarnings("unused") @Test public void testProvideTokenHandlers_1() throws Exception { final OAuth2HandlerModule fixture = new OAuth2HandlerModule(); final BearerTokenHandler bearerTokenHandler = new BearerTokenHandler(); final MacTokenHandler macTokenHandler = new MacTokenHandler(); final List<ResourceRequestHandler> result = OAuth2HandlerModule.provideTokenHandlers( bearerTokenHandler, macTokenHandler); Assert.assertNotNull(result); Assert.assertEquals(2, result.size()); } }
@Test public void testConfigure_1() throws Exception { final OAuth2HandlerModule fixture = new OAuth2HandlerModule(); Assert.assertTrue(AbstractModule.class.isInstance(fixture)); }
@Test @SuppressWarnings({ "unchecked", "unused" }) public void testProvideAuthorizationEndpointResponseHandlers_1() throws Exception { final OAuth2HandlerModule fixture = new OAuth2HandlerModule(); final CodeAuthorizationResponseHandler codeAuthorizationResponseHandler = new CodeAuthorizationResponseHandler( EasyMock.createNiceMock(Provider.class), EasyMock.createNiceMock(List.class), EasyMock.createNiceMock(List.class), EasyMock.createNiceMock(HttpFetcher.class)); final TokenAuthorizationResponseHandler tokenAuthorizationResponseHandler = new TokenAuthorizationResponseHandler( EasyMock.createNiceMock(Provider.class), EasyMock.createNiceMock(OAuth2Store.class)); final List<AuthorizationEndpointResponseHandler> result = OAuth2HandlerModule .provideAuthorizationEndpointResponseHandlers(codeAuthorizationResponseHandler); Assert.assertNotNull(result); Assert.assertEquals(1, result.size()); }
@Test public void testConfigure_1() throws Exception { final OAuth2HandlerModule fixture = new OAuth2HandlerModule(); Assert.assertTrue(AbstractModule.class.isInstance(fixture)); }
@SuppressWarnings("unused") @Test public void testProvideTokenHandlers_1() throws Exception { final OAuth2HandlerModule fixture = new OAuth2HandlerModule(); final BearerTokenHandler bearerTokenHandler = new BearerTokenHandler(); final MacTokenHandler macTokenHandler = new MacTokenHandler(); final List<ResourceRequestHandler> result = OAuth2HandlerModule.provideTokenHandlers( bearerTokenHandler, macTokenHandler); Assert.assertNotNull(result); Assert.assertEquals(2, result.size()); } }
@Test @SuppressWarnings({ "unchecked", "unused" }) public void testProvideAuthorizationEndpointResponseHandlers_1() throws Exception { final OAuth2HandlerModule fixture = new OAuth2HandlerModule(); final CodeAuthorizationResponseHandler codeAuthorizationResponseHandler = new CodeAuthorizationResponseHandler( EasyMock.createNiceMock(Provider.class), EasyMock.createNiceMock(List.class), EasyMock.createNiceMock(List.class), EasyMock.createNiceMock(HttpFetcher.class)); final TokenAuthorizationResponseHandler tokenAuthorizationResponseHandler = new TokenAuthorizationResponseHandler( EasyMock.createNiceMock(Provider.class), EasyMock.createNiceMock(OAuth2Store.class)); final List<AuthorizationEndpointResponseHandler> result = OAuth2HandlerModule .provideAuthorizationEndpointResponseHandlers(codeAuthorizationResponseHandler); Assert.assertNotNull(result); Assert.assertEquals(1, result.size()); }
@SuppressWarnings("unused") @Test public void testProvideClientAuthenticationHandlers_1() throws Exception { final OAuth2HandlerModule fixture = new OAuth2HandlerModule(); final BasicAuthenticationHandler basicAuthenticationHandler = new BasicAuthenticationHandler(); final StandardAuthenticationHandler standardAuthenticationHandler = new StandardAuthenticationHandler(); final List<ClientAuthenticationHandler> result = OAuth2HandlerModule .provideClientAuthenticationHandlers(basicAuthenticationHandler, standardAuthenticationHandler); Assert.assertNotNull(result); Assert.assertEquals(2, result.size()); }
@Before public void setUp() throws Exception { Injector injector = Guice.createInjector(new GadgetAdminModule(), new DefaultGuiceModule(), new OAuthModule(), new OAuth2Module(), new PropertiesModule(), new OAuth2PersistenceModule(), new OAuth2MessageModule(), new OAuth2HandlerModule()); parser = injector.getInstance(GadgetHtmlParser.class); processor = injector.getInstance(TemplateProcessor.class); context = new TemplateContext(new Gadget(), null); }
@Test @SuppressWarnings({ "unchecked", "unused" }) public void testProvideGrantRequestHandlers_1() throws Exception { final OAuth2HandlerModule fixture = new OAuth2HandlerModule(); final ClientCredentialsGrantTypeHandler clientCredentialsGrantTypeHandler = new ClientCredentialsGrantTypeHandler( EasyMock.createNiceMock(List.class)); final CodeGrantTypeHandler codeGrantTypeHandler = new CodeGrantTypeHandler(); final List<GrantRequestHandler> result = OAuth2HandlerModule.provideGrantRequestHandlers( clientCredentialsGrantTypeHandler, codeGrantTypeHandler); Assert.assertNotNull(result); Assert.assertEquals(2, result.size()); }
@Test @SuppressWarnings({ "unchecked", "unused" }) public void testProvideTokenEndpointResponseHandlers_1() throws Exception { final OAuth2HandlerModule fixture = new OAuth2HandlerModule(); final TokenAuthorizationResponseHandler tokenAuthorizationResponseHandler = new TokenAuthorizationResponseHandler( EasyMock.createNiceMock(Provider.class), EasyMock.createNiceMock(OAuth2Store.class)); final List<TokenEndpointResponseHandler> result = OAuth2HandlerModule .provideTokenEndpointResponseHandlers(tokenAuthorizationResponseHandler); Assert.assertNotNull(result); Assert.assertEquals(1, result.size()); }
@Before public void setUp() throws Exception { Injector injector = Guice.createInjector(new GadgetAdminModule(), new DefaultGuiceModule(), new OAuthModule(), new OAuth2Module(), new PropertiesModule(), new OAuth2PersistenceModule(), new OAuth2MessageModule(), new OAuth2HandlerModule()); parser = injector.getInstance(GadgetHtmlParser.class); processor = injector.getInstance(TemplateProcessor.class); context = new TemplateContext(new Gadget(), null); }
@Before public void setUp() { injector = Guice.createInjector( new PropertiesModule(), new GadgetAdminModule(), new DefaultGuiceModule(), new OAuthModule(), new OAuth2Module(), new OAuth2PersistenceModule(), new OAuth2MessageModule(), new OAuth2HandlerModule()); }
@Before public void setUp() { injector = Guice.createInjector( new PropertiesModule(), new GadgetAdminModule(), new DefaultGuiceModule(), new OAuthModule(), new OAuth2Module(), new OAuth2PersistenceModule(), new OAuth2MessageModule(), new OAuth2HandlerModule()); }
@Override @Before public void setUp() throws Exception { super.setUp(); injector = Guice.createInjector( new PropertiesModule(), new GadgetAdminModule(), new DefaultGuiceModule(), new OAuthModule(), new OAuth2Module(), new OAuth2PersistenceModule(), new OAuth2MessageModule(), new OAuth2HandlerModule()); ParseModule.DOMImplementationProvider domImpl = new ParseModule.DOMImplementationProvider(); htmlParser = new CajaHtmlParser(domImpl.get()); serializer = new CajaHtmlSerializer(); ContainerConfig config = injector.getInstance(ContainerConfig.class); config.newTransaction().addContainer(MOCK_CONTAINER_CONFIG).commit(); proxyUriManager = new DefaultProxyUriManager(config, null); }
@Override @Before public void setUp() throws Exception { super.setUp(); injector = Guice.createInjector( new PropertiesModule(), new GadgetAdminModule(), new DefaultGuiceModule(), new OAuthModule(), new OAuth2Module(), new OAuth2PersistenceModule(), new OAuth2MessageModule(), new OAuth2HandlerModule()); ParseModule.DOMImplementationProvider domImpl = new ParseModule.DOMImplementationProvider(); htmlParser = new CajaHtmlParser(domImpl.get()); serializer = new CajaHtmlSerializer(); ContainerConfig config = injector.getInstance(ContainerConfig.class); config.newTransaction().addContainer(MOCK_CONTAINER_CONFIG).commit(); proxyUriManager = new DefaultProxyUriManager(config, null); }