Skip to content
Snippets Groups Projects
Commit 758740a3 authored by Komal Makkar's avatar Komal Makkar
Browse files

UT updated

parent 8b5625c5
No related branches found
No related tags found
1 merge request!15Integration tests Refactored
Pipeline #7383 failed
......@@ -97,24 +97,26 @@ public class ServiceAccountClientImplTest {
public void should_getTokenFromCache_getIdTokenTest() {
// SetUp
when(tenantJwtCacheMock.get(any())).thenReturn(idToken);
String expectedToken = "Bearer " +idToken.getTokenValue();
// Act
String returnedIdToken = sut.getIdToken(tenantName);
// Assert
Assert.assertEquals(idToken.getTokenValue(), returnedIdToken);
Assert.assertEquals(expectedToken, returnedIdToken);
}
@Test
public void should_updateCache_getIdTokenTest() {
// Set up
when(tenantJwtCacheMock.get(any())).thenReturn(idToken);
String expectedToken = "Bearer " +idToken.getTokenValue();
// Act
String returnedToken = this.sut.getIdToken(tenantName);
// Assert
Assert.assertEquals(validToken, returnedToken);
Assert.assertEquals(expectedToken, returnedToken);
}
@Test
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment