@Test public void testIsAllowModuleOverride_2() throws Exception { final boolean result = OAuth2ClientTest.client2.isAllowModuleOverride(); Assert.assertFalse(result); }
@Test public void testIsAllowModuleOverride_1() throws Exception { final boolean result = OAuth2ClientTest.client1.isAllowModuleOverride(); Assert.assertTrue(result); }
@Test public void testIsAllowModuleOverride_1() throws Exception { final boolean result = OAuth2ClientTest.client1.isAllowModuleOverride(); Assert.assertTrue(result); }
@Test public void testIsAllowModuleOverride_2() throws Exception { final boolean result = OAuth2ClientTest.client2.isAllowModuleOverride(); Assert.assertFalse(result); }
Assert.assertEquals(MockUtils.TOKEN_URL, client.getTokenUrl()); Assert.assertEquals(OAuth2Accessor.Type.CONFIDENTIAL, client.getType()); Assert.assertEquals(true, client.isAllowModuleOverride()); Assert.assertEquals(true, client.isAuthorizationHeader()); Assert.assertEquals(false, client.isUrlParameter()); Assert.assertEquals(MockUtils.TOKEN_URL, client.getTokenUrl()); Assert.assertEquals(OAuth2Accessor.Type.PUBLIC, client.getType()); Assert.assertEquals(false, client.isAllowModuleOverride()); Assert.assertEquals(false, client.isAuthorizationHeader()); Assert.assertEquals(true, client.isUrlParameter());
Assert.assertEquals(MockUtils.TOKEN_URL, client.getTokenUrl()); Assert.assertEquals(OAuth2Accessor.Type.CONFIDENTIAL, client.getType()); Assert.assertEquals(true, client.isAllowModuleOverride()); Assert.assertEquals(true, client.isAuthorizationHeader()); Assert.assertEquals(false, client.isUrlParameter()); Assert.assertEquals(MockUtils.TOKEN_URL, client.getTokenUrl()); Assert.assertEquals(OAuth2Accessor.Type.PUBLIC, client.getType()); Assert.assertEquals(false, client.isAllowModuleOverride()); Assert.assertEquals(false, client.isAuthorizationHeader()); Assert.assertEquals(true, client.isUrlParameter());
user, scope, client.isAllowModuleOverride(), this, this.globalRedirectUri, this.authority, this.contextRoot); newAccessor.setAccessToken(accessToken);
@Test public void testOAuth2Client_1() throws Exception { final OAuth2Client result = new OAuth2Client(MockUtils.getDummyEncrypter()); Assert.assertNotNull(result); Assert.assertEquals(null, result.getAuthorizationUrl()); Assert.assertEquals(null, result.getClientAuthenticationType()); Assert.assertEquals(null, result.getClientId()); Assert.assertEquals(null, result.getClientSecret()); Assert.assertEquals(null, result.getEncryptedSecret()); Assert.assertEquals(null, result.getGadgetUri()); Assert.assertEquals("NONE", result.getGrantType()); Assert.assertEquals(null, result.getRedirectUri()); Assert.assertEquals(null, result.getServiceName()); Assert.assertEquals(null, result.getTokenUrl()); Assert.assertEquals(false, result.isAllowModuleOverride()); Assert.assertEquals(false, result.isAuthorizationHeader()); Assert.assertEquals(false, result.isUrlParameter()); Assert .assertEquals( "org.apache.shindig.gadgets.oauth2.persistence.sample.OAuth2ClientImpl: serviceName = null , redirectUri = null , gadgetUri = null , clientId = null , grantType = NONE , type = UNKNOWN , grantType = NONE , tokenUrl = null , authorizationUrl = null , this.clientAuthenticationType = null , this.sharedToken = false, this.allowedDomains = []", result.toString()); }
@Test public void testOAuth2Client_1() throws Exception { final OAuth2Client result = new OAuth2Client(MockUtils.getDummyEncrypter()); Assert.assertNotNull(result); Assert.assertEquals(null, result.getAuthorizationUrl()); Assert.assertEquals(null, result.getClientAuthenticationType()); Assert.assertEquals(null, result.getClientId()); Assert.assertEquals(null, result.getClientSecret()); Assert.assertEquals(null, result.getEncryptedSecret()); Assert.assertEquals(null, result.getGadgetUri()); Assert.assertEquals("NONE", result.getGrantType()); Assert.assertEquals(null, result.getRedirectUri()); Assert.assertEquals(null, result.getServiceName()); Assert.assertEquals(null, result.getTokenUrl()); Assert.assertEquals(false, result.isAllowModuleOverride()); Assert.assertEquals(false, result.isAuthorizationHeader()); Assert.assertEquals(false, result.isUrlParameter()); Assert .assertEquals( "org.apache.shindig.gadgets.oauth2.persistence.sample.OAuth2ClientImpl: serviceName = null , redirectUri = null , gadgetUri = null , clientId = null , grantType = NONE , type = UNKNOWN , grantType = NONE , tokenUrl = null , authorizationUrl = null , this.clientAuthenticationType = null , this.sharedToken = false, this.allowedDomains = []", result.toString()); }