RefreshToken to AuthHolder linkage test now using AuthHolder ID to verify

pull/703/head
arielak 10 years ago
parent 797acd73f3
commit 1815aa0be1

@ -929,9 +929,7 @@ public class TestMITREidDataService_1_0 {
List<OAuth2RefreshTokenEntity> savedRefreshTokens = new ArrayList(fakeRefreshTokenTable.values()); //capturedRefreshTokens.getAllValues();
Collections.sort(savedRefreshTokens, new refreshTokenIdComparator());
assertThat(savedRefreshTokens.get(0).getAuthenticationHolder().getAuthentication().getOAuth2Request().getClientId(),
equalTo(token1.getAuthenticationHolder().getAuthentication().getOAuth2Request().getClientId()));
assertThat(savedRefreshTokens.get(1).getAuthenticationHolder().getAuthentication().getOAuth2Request().getClientId(),
equalTo(token2.getAuthenticationHolder().getAuthentication().getOAuth2Request().getClientId()));
assertThat(savedRefreshTokens.get(0).getAuthenticationHolder().getId(), equalTo(356L));
assertThat(savedRefreshTokens.get(1).getAuthenticationHolder().getId(), equalTo(357L));
}
}

@ -1823,10 +1823,8 @@ public class TestMITREidDataService_1_1 {
List<OAuth2RefreshTokenEntity> savedRefreshTokens = new ArrayList(fakeRefreshTokenTable.values()); //capturedRefreshTokens.getAllValues();
Collections.sort(savedRefreshTokens, new refreshTokenIdComparator());
assertThat(savedRefreshTokens.get(0).getAuthenticationHolder().getAuthentication().getOAuth2Request().getClientId(),
equalTo(token1.getAuthenticationHolder().getAuthentication().getOAuth2Request().getClientId()));
assertThat(savedRefreshTokens.get(1).getAuthenticationHolder().getAuthentication().getOAuth2Request().getClientId(),
equalTo(token2.getAuthenticationHolder().getAuthentication().getOAuth2Request().getClientId()));
assertThat(savedRefreshTokens.get(0).getAuthenticationHolder().getId(), equalTo(356L));
assertThat(savedRefreshTokens.get(1).getAuthenticationHolder().getId(), equalTo(357L));
}
private Set<String> jsonArrayToStringSet(JsonArray a) {

Loading…
Cancel
Save