From dcba52858a8815a99628e1198505b6a3e9369e85 Mon Sep 17 00:00:00 2001 From: Christian Kollmann Date: Tue, 30 Nov 2021 15:34:19 +0100 Subject: Remove unused constant Fixes #10 --- ...eceiveMobilePhoneSignatureResponseTaskTest.java | 27 ++++++++++------------ 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'eidas_modules/authmodule-eIDAS-v2/src/test/java/at') diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveMobilePhoneSignatureResponseTaskTest.java b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveMobilePhoneSignatureResponseTaskTest.java index b072b8b2..9396183c 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveMobilePhoneSignatureResponseTaskTest.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveMobilePhoneSignatureResponseTaskTest.java @@ -345,13 +345,12 @@ public class ReceiveMobilePhoneSignatureResponseTaskTest { RegisterStatusResults registerSearchResult = new RegisterStatusResults(new RegisterOperationStatus(generateRandomProcessId()), Collections.emptyList(), Collections.emptyList()); MatchingTaskUtils.storeIntermediateMatchingResult(pendingReq, registerSearchResult); - + task.execute(pendingReq, executionContext); AuthProcessDataWrapper session = pendingReq.getSessionData(AuthProcessDataWrapper.class); assertEquals("LoA", "http://eidas.europa.eu/LoA/low", session.getQaaLevel()); assertEquals("IssueInstant", "2014-03-05T06:39:51Z", session.getIssueInstantString()); - assertNull("Matching BPK", session.getGenericDataFromSession(Constants.DATA_RESULT_MATCHING_BPK)); assertEquals("Transition To S16", true, executionContext.get(Constants.TRANSITION_TO_GENERATE_GUI_QUERY_AUSTRIAN_RESIDENCE_TASK)); } @@ -370,9 +369,8 @@ public class ReceiveMobilePhoneSignatureResponseTaskTest { AuthProcessDataWrapper session = pendingReq.getSessionData(AuthProcessDataWrapper.class); assertEquals("LoA", "http://eidas.europa.eu/LoA/low", session.getQaaLevel()); assertEquals("IssueInstant", "2014-03-05T06:39:51Z", session.getIssueInstantString()); - assertNull("Matching BPK", session.getGenericDataFromSession(Constants.DATA_RESULT_MATCHING_BPK)); assertNull("Transition To S16", executionContext.get(Constants.TRANSITION_TO_GENERATE_GUI_QUERY_AUSTRIAN_RESIDENCE_TASK)); - + //TODO: update this check because this task selects one result from MDS search result before and creates a new element //Mockito.verify(registerSearchService).step7aKittProcess(eq(registerSearchResult), eq(eidData)); } @@ -390,15 +388,14 @@ public class ReceiveMobilePhoneSignatureResponseTaskTest { TaskExecutionException e = assertThrows(TaskExecutionException.class, () -> task.execute(pendingReq, executionContext)); - + assertEquals(pendingReq.getPendingRequestId(), e.getPendingRequestID()); isInstanceOf(AuthnResponseValidationException.class, e.getOriginalException()); isInstanceOf(ManualFixNecessaryException.class, e.getOriginalException().getCause()); assertEquals("sp.pvp2.12", ((AuthnResponseValidationException) e.getOriginalException()).getErrorId()); - - - AuthProcessDataWrapper session = pendingReq.getSessionData(AuthProcessDataWrapper.class); - assertNull("Matching BPK", session.getGenericDataFromSession(Constants.DATA_RESULT_MATCHING_BPK)); + + + AuthProcessDataWrapper session = pendingReq.getSessionData(AuthProcessDataWrapper.class); assertNull("Transition To S16", executionContext.get(Constants.TRANSITION_TO_GENERATE_GUI_QUERY_AUSTRIAN_RESIDENCE_TASK)); } @@ -411,9 +408,9 @@ public class ReceiveMobilePhoneSignatureResponseTaskTest { .givenName("foo") .familyName("foo") .dateOfBirth("bar") - .build()), + .build()), Collections.emptyList()); - + } @NotNull @@ -433,16 +430,16 @@ public class ReceiveMobilePhoneSignatureResponseTaskTest { .familyName("familyName") .dateOfBirth("dateOfBirth") .build()); - - return new RegisterStatusResults(new RegisterOperationStatus(generateRandomProcessId()), + + return new RegisterStatusResults(new RegisterOperationStatus(generateRandomProcessId()), results, Collections.emptyList()); } private BigInteger generateRandomProcessId() { return new BigInteger(RandomStringUtils.randomNumeric(10)); - + } - + private SimpleEidasData.SimpleEidasDataBuilder createEidasDataMatchingToSamlResponse() { // data from "/data/Response_with_EID.xml" return SimpleEidasData.builder() -- cgit v1.2.3