use of com.microsoft.identity.common.internal.dto.IdTokenRecord in project microsoft-authentication-library-common-for-android by AzureAD.
the class CacheKeyValueDelegateTest method idTokenCreateCacheKeyComplete.
// End PrimaryRefreshTokens
// IdTokens
@Test
public void idTokenCreateCacheKeyComplete() {
final IdTokenRecord idToken = new IdTokenRecord();
idToken.setHomeAccountId(HOME_ACCOUNT_ID);
idToken.setEnvironment(ENVIRONMENT);
idToken.setCredentialType(CredentialType.IdToken.name());
idToken.setClientId(CLIENT_ID);
idToken.setRealm(REALM);
final String expectedKey = // just for formatting
"" + HOME_ACCOUNT_ID + CACHE_VALUE_SEPARATOR + ENVIRONMENT + CACHE_VALUE_SEPARATOR + CREDENTIAL_TYPE_ID_TOKEN + CACHE_VALUE_SEPARATOR + CLIENT_ID + CACHE_VALUE_SEPARATOR + REALM + CACHE_VALUE_SEPARATOR;
assertEquals(expectedKey, mDelegate.generateCacheKey(idToken));
}
Aggregations