@Test public void testGetTokenUrl_1() throws Exception { final String result = OAuth2ClientTest.client1.getTokenUrl(); Assert.assertNotNull(result); Assert.assertEquals(MockUtils.TOKEN_URL, result); }
@Test public void testGetTokenUrl_1() throws Exception { final String result = OAuth2ClientTest.client1.getTokenUrl(); Assert.assertNotNull(result); Assert.assertEquals(MockUtils.TOKEN_URL, result); }
Assert.assertEquals(MockUtils.REDIRECT_URI, client.getRedirectUri()); Assert.assertEquals(MockUtils.SERVICE_NAME, client.getServiceName()); Assert.assertEquals(MockUtils.TOKEN_URL, client.getTokenUrl()); Assert.assertEquals(OAuth2Accessor.Type.CONFIDENTIAL, client.getType()); Assert.assertEquals(true, client.isAllowModuleOverride()); Assert.assertEquals(MockUtils.REDIRECT_URI, client.getRedirectUri()); Assert.assertEquals(MockUtils.SERVICE_NAME, client.getServiceName()); Assert.assertEquals(MockUtils.TOKEN_URL, client.getTokenUrl()); Assert.assertEquals(OAuth2Accessor.Type.PUBLIC, client.getType()); Assert.assertEquals(false, client.isAllowModuleOverride());
Assert.assertEquals(MockUtils.REDIRECT_URI, client.getRedirectUri()); Assert.assertEquals(MockUtils.SERVICE_NAME, client.getServiceName()); Assert.assertEquals(MockUtils.TOKEN_URL, client.getTokenUrl()); Assert.assertEquals(OAuth2Accessor.Type.CONFIDENTIAL, client.getType()); Assert.assertEquals(true, client.isAllowModuleOverride()); Assert.assertEquals(MockUtils.REDIRECT_URI, client.getRedirectUri()); Assert.assertEquals(MockUtils.SERVICE_NAME, client.getServiceName()); Assert.assertEquals(MockUtils.TOKEN_URL, client.getTokenUrl()); Assert.assertEquals(OAuth2Accessor.Type.PUBLIC, client.getType()); Assert.assertEquals(false, client.isAllowModuleOverride());
newAccessor.setRedirectUri(client.getRedirectUri()); newAccessor.setRefreshToken(refreshToken); newAccessor.setTokenUrl(client.getTokenUrl()); newAccessor.setType(client.getType()); newAccessor.setAllowedDomains(client.getAllowedDomains());
@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()); }