Skip to content

Commit

Permalink
removed unwanted stubbing
Browse files Browse the repository at this point in the history
  • Loading branch information
Ritik Jain (IN74108) committed Apr 16, 2024
1 parent 13213d2 commit fbaa643
Showing 1 changed file with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,6 @@ public void logAudit_WithValidStatus_ThenPass() throws Exception {
new ParameterizedTypeReference<ResponseWrapper>() {
};
Mockito.when(authTransactionHelper.getAuthToken()).thenReturn("authToken");
Mockito.when(objectMapper.writeValueAsString(any())).thenReturn("requestBody");
Mockito.when(restTemplate.exchange(
Mockito.any(RequestEntity.class),
Mockito.eq(responseType)
)).thenReturn(responseEntity);
try {
idaAuditPlugin.logAudit(username,action, status, auditDTO, null);
Assert.assertTrue(true);
Expand All @@ -120,11 +115,6 @@ public void logAudit_WithUnauthorizedStatus_ThenPass() throws Exception {
new ParameterizedTypeReference<ResponseWrapper>() {
};
Mockito.when(authTransactionHelper.getAuthToken()).thenReturn("authToken");
Mockito.when(objectMapper.writeValueAsString(any())).thenReturn("requestBody");
Mockito.when(restTemplate.exchange(
Mockito.any(RequestEntity.class),
Mockito.eq(responseType)
)).thenReturn(responseEntity);
try {
idaAuditPlugin.logAudit(username,action, status, auditDTO, null);
Assert.assertTrue(true);
Expand All @@ -145,11 +135,6 @@ public void logAudit_WithForbiddenStatus_ThenPass() throws Exception {
new ParameterizedTypeReference<ResponseWrapper>() {
};
Mockito.when(authTransactionHelper.getAuthToken()).thenReturn("authToken");
Mockito.when(objectMapper.writeValueAsString(any())).thenReturn("requestBody");
Mockito.when(restTemplate.exchange(
Mockito.any(RequestEntity.class),
Mockito.eq(responseType)
)).thenReturn(responseEntity);
try {
idaAuditPlugin.logAudit(username,action, status, auditDTO, null);
Assert.assertTrue(true);
Expand Down

0 comments on commit fbaa643

Please sign in to comment.