Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
janakamarasena committed Oct 23, 2023
1 parent 6b8753a commit 3bb5fae
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public void testHandleAuthentication(boolean isMultiOpsResponse, String redirect
AuthServiceRequest authServiceRequest = new AuthServiceRequest(request, response);
when(request.getAttribute(FrameworkConstants.IS_MULTI_OPS_RESPONSE)).thenReturn(isMultiOpsResponse);
when(request.getAttribute(FrameworkConstants.RequestParams.FLOW_STATUS)).thenReturn(authenticatorFlowStatus);
when(request.getAttribute(FrameworkConstants.SESSION_DATA_KEY)).thenReturn(sessionDataKey);
when(request.getAttribute(FrameworkConstants.CONTEXT_IDENTIFIER)).thenReturn(sessionDataKey);
if (isMultiOpsResponse) {
List<AuthenticatorData> authenticatorDataMap = getMultiOpsAuthenticatorData(authenticatorList);
for (AuthenticatorData authenticatorData : authenticatorDataMap) {
Expand Down Expand Up @@ -180,7 +180,7 @@ public void testNegativeHandleAuthentication(String redirectUrl, Object authenti
AuthServiceRequest authServiceRequest = new AuthServiceRequest(request, response);
when(request.getAttribute(FrameworkConstants.IS_MULTI_OPS_RESPONSE)).thenReturn(false);
when(request.getAttribute(FrameworkConstants.RequestParams.FLOW_STATUS)).thenReturn(authenticatorFlowStatus);
when(request.getAttribute(FrameworkConstants.SESSION_DATA_KEY)).thenReturn(sessionDataKey);
when(request.getAttribute(FrameworkConstants.CONTEXT_IDENTIFIER)).thenReturn(sessionDataKey);
List<AuthenticatorData> expected = getAuthenticatorData(authenticatorList);
if (AuthenticatorFlowStatus.INCOMPLETE == authenticatorFlowStatus) {
when(request.getAttribute(AuthServiceConstants.AUTH_SERVICE_AUTH_INITIATION_DATA)).thenReturn(expected);
Expand Down

0 comments on commit 3bb5fae

Please sign in to comment.