From 09751b59f7e2da247c32324826607e5f1eef0f10 Mon Sep 17 00:00:00 2001 From: Alexander Marsalek Date: Fri, 15 Jan 2021 16:56:29 +0100 Subject: fix for test102* --- .../v2/test/tasks/InitialSearchTaskFirstTest.java | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'eidas_modules/authmodule-eIDAS-v2/src/test/java') diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/InitialSearchTaskFirstTest.java b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/InitialSearchTaskFirstTest.java index 9f58ba71..62c00813 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/InitialSearchTaskFirstTest.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/InitialSearchTaskFirstTest.java @@ -135,7 +135,7 @@ public class InitialSearchTaskFirstTest { public void testNode100_UserIdentifiedUpdateNecessary_a() throws Exception { String newFirstName = RandomStringUtils.randomAlphabetic(10); Mockito.when(zmrClient.searchWithPersonIdentifier(randomIdentifier)).thenReturn(Collections.singletonList( - new RegisterResult(randomBpk, randomPseudonym, newFirstName, randomFamilyName, randomDate))); + new RegisterResult(randomBpk, randomIdentifier, newFirstName, randomFamilyName, randomDate))); Mockito.when(ernpClient.searchWithPersonIdentifier(randomIdentifier)).thenReturn(Collections.emptyList()); task.execute(pendingReq, executionContext); @@ -155,7 +155,7 @@ public class InitialSearchTaskFirstTest { Mockito.when(zmrClient.searchWithPersonIdentifier(randomIdentifier)).thenReturn(Collections.emptyList()); String newRandomGivenName = RandomStringUtils.randomAlphabetic(10); Mockito.when(ernpClient.searchWithPersonIdentifier(randomIdentifier)).thenReturn(Collections.singletonList( - new RegisterResult(randomBpk, randomPseudonym, newRandomGivenName, randomFamilyName, randomDate))); + new RegisterResult(randomBpk, randomIdentifier, newRandomGivenName, randomFamilyName, randomDate))); task.execute(pendingReq, executionContext); String bPk = (String) @@ -172,9 +172,9 @@ public class InitialSearchTaskFirstTest { @DirtiesContext public void testNode101_ManualFixNecessary_a() { ArrayList zmrResult = new ArrayList<>(); - zmrResult.add(new RegisterResult(randomBpk, randomPseudonym, randomGivenName, randomFamilyName, randomDate)); + zmrResult.add(new RegisterResult(randomBpk, randomIdentifier, randomGivenName, randomFamilyName, randomDate)); String newRandomGivenName = randomGivenName + RandomStringUtils.randomAlphabetic(2); - zmrResult.add(new RegisterResult(randomBpk, randomPseudonym, newRandomGivenName, randomFamilyName, randomDate)); + zmrResult.add(new RegisterResult(randomBpk, randomIdentifier, newRandomGivenName, randomFamilyName, randomDate)); Mockito.when(zmrClient.searchWithPersonIdentifier(randomIdentifier)).thenReturn(zmrResult); Mockito.when(ernpClient.searchWithPersonIdentifier(randomIdentifier)).thenReturn(Collections.emptyList()); @@ -197,7 +197,7 @@ public class InitialSearchTaskFirstTest { ernpResult.add(new RegisterResult(randomBpk, randomPseudonym, randomGivenName, randomFamilyName, randomDate)); String newRandomGivenName = randomGivenName + RandomStringUtils.randomAlphabetic(2); ernpResult.add( - new RegisterResult(randomBpk, randomPseudonym, newRandomGivenName, randomFamilyName, randomDate)); + new RegisterResult(randomBpk, randomIdentifier, newRandomGivenName, randomFamilyName, randomDate)); Mockito.when(ernpClient.searchWithPersonIdentifier(randomIdentifier)).thenReturn(ernpResult); TaskExecutionException exception = assertThrows(TaskExecutionException.class, @@ -215,7 +215,7 @@ public class InitialSearchTaskFirstTest { public void testNode102_UserIdentified_a() throws Exception { Mockito.when(zmrClient.searchWithPersonIdentifier(randomIdentifier)).thenReturn(Collections.emptyList()); Mockito.when(ernpClient.searchWithPersonIdentifier(randomIdentifier)).thenReturn(Collections.singletonList( - new RegisterResult(randomBpk, randomPseudonym, randomGivenName, randomFamilyName, randomDate))); + new RegisterResult(randomBpk, randomIdentifier, randomGivenName, randomFamilyName, randomDate))); task.execute(pendingReq, executionContext); String bPk = (String) @@ -231,7 +231,7 @@ public class InitialSearchTaskFirstTest { @DirtiesContext public void testNode102_UserIdentified_b() throws Exception { Mockito.when(zmrClient.searchWithPersonIdentifier(randomIdentifier)).thenReturn(Collections.singletonList( - new RegisterResult(randomBpk, randomPseudonym, randomGivenName, randomFamilyName, randomDate))); + new RegisterResult(randomBpk, randomIdentifier, randomGivenName, randomFamilyName, randomDate))); Mockito.when(ernpClient.searchWithPersonIdentifier(randomIdentifier)).thenReturn(Collections.emptyList()); task.execute(pendingReq, executionContext); @@ -254,9 +254,9 @@ public class InitialSearchTaskFirstTest { pendingReq1.getSessionData(AuthProcessDataWrapper.class) .setGenericDataToSession(Constants.DATA_FULL_EIDAS_RESPONSE, response); Mockito.when(zmrClient.searchWithPersonIdentifier(randomIdentifier)).thenReturn(Collections.emptyList()); - String newRandomPseudonym = IT_ST + randomIdentifier + RandomStringUtils.randomNumeric(2); + String newRandomIdentifier = randomIdentifier + RandomStringUtils.randomNumeric(2); Mockito.when(zmrClient.searchItSpecific(taxNumber)).thenReturn(Collections.singletonList( - new RegisterResult(randomBpk, newRandomPseudonym, randomGivenName, randomFamilyName, + new RegisterResult(randomBpk, newRandomIdentifier, randomGivenName, randomFamilyName, randomDate, null, null, taxNumber, null))); Mockito.when(ernpClient.searchWithPersonIdentifier(randomIdentifier)).thenReturn(Collections.emptyList()); task = new InitialSearchTask( @@ -286,7 +286,7 @@ public class InitialSearchTaskFirstTest { Mockito.when(zmrClient.searchWithPersonIdentifier(randomIdentifier)).thenReturn(Collections.emptyList()); Mockito.when(zmrClient.searchDeSpecific(randomGivenName, randomFamilyName, randomDate, randomPlaceOfBirth, randomBirthName)) - .thenReturn(Collections.singletonList(new RegisterResult(randomBpk, randomPseudonym, randomGivenName, + .thenReturn(Collections.singletonList(new RegisterResult(randomBpk, randomIdentifier, randomGivenName, randomFamilyName, randomDate, randomPlaceOfBirth, randomBirthName, null, null))); Mockito.when(ernpClient.searchWithPersonIdentifier(randomIdentifier)).thenReturn(Collections.emptyList()); task = new InitialSearchTask( @@ -318,7 +318,7 @@ public class InitialSearchTaskFirstTest { Mockito.when(zmrClient.searchWithPersonIdentifier(randomIdentifier)).thenReturn(Collections.emptyList()); ArrayList zmrResultSpecific = new ArrayList<>(); zmrResultSpecific.add( - new RegisterResult(randomBpk, randomPseudonym, randomGivenName, randomFamilyName, randomDate, + new RegisterResult(randomBpk, randomIdentifier, randomGivenName, randomFamilyName, randomDate, randomPlaceOfBirth, randomBirthName, null, null)); zmrResultSpecific.add(new RegisterResult(newRandomBpk, newRandomPseudonym, randomGivenName, randomFamilyName, randomDate, randomPlaceOfBirth, randomBirthName, null, null)); -- cgit v1.2.3