From 3c8e90a725408188c5b64b985bacf4ad82322c67 Mon Sep 17 00:00:00 2001 From: andrej romanov <50377758+auumgn@users.noreply.github.com> Date: Wed, 20 Nov 2024 20:35:19 +0200 Subject: [PATCH] test fix --- .../PublicProfileControllerTest.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/orcid-web/src/test/java/org/orcid/frontend/web/controllers/PublicProfileControllerTest.java b/orcid-web/src/test/java/org/orcid/frontend/web/controllers/PublicProfileControllerTest.java index 732d52f5a5..2baeed682f 100644 --- a/orcid-web/src/test/java/org/orcid/frontend/web/controllers/PublicProfileControllerTest.java +++ b/orcid-web/src/test/java/org/orcid/frontend/web/controllers/PublicProfileControllerTest.java @@ -191,17 +191,18 @@ public void testGetPersonDetails() { assertEquals(2, emails.keySet().size()); assertTrue(emails.containsKey("public_0000-0000-0000-0003@test.orcid.org")); assertTrue(emails.containsKey("public_0000-0000-0000-0003@orcid.org")); - List publicEmails = emails.get("public_0000-0000-0000-0003@test.orcid.org"); - assertEquals("public_0000-0000-0000-0003@test.orcid.org", publicEmails.get(0).getEmail()); - assertEquals("public_0000-0000-0000-0003@orcid.org", publicEmails.get(1).getEmail()); - assertEquals(Visibility.PUBLIC, publicEmails.get(0).getVisibility()); - assertEquals(Visibility.PUBLIC, publicEmails.get(0).getVisibility()); - assertEquals("APP-5555555555555555", publicEmails.get(0).getSource().retrieveSourcePath()); - assertEquals("Source Client 1", publicEmails.get(0).getSource().getSourceName().getContent()); - assertNull(publicEmails.get(0).getSource().getSourceOrcid()); - assertEquals("0000-0000-0000-0000", publicEmails.get(1).getSource().retrieveSourcePath()); - assertEquals("ORCID email validation", publicEmails.get(1).getSource().getSourceName().getContent()); - assertNull(publicEmails.get(1).getSource().getSourceOrcid()); + List email1 = emails.get("public_0000-0000-0000-0003@test.orcid.org"); + List email2 = emails.get("public_0000-0000-0000-0003@orcid.org"); + assertEquals("public_0000-0000-0000-0003@test.orcid.org", email1.get(0).getEmail()); + assertEquals("public_0000-0000-0000-0003@orcid.org", email2.get(0).getEmail()); + assertEquals(Visibility.PUBLIC, email1.get(0).getVisibility()); + assertEquals(Visibility.PUBLIC, email2.get(0).getVisibility()); + assertEquals("APP-5555555555555555", email1.get(0).getSource().retrieveSourcePath()); + assertEquals("Source Client 1", email1.get(0).getSource().getSourceName().getContent()); + assertNull(email1.get(0).getSource().getSourceOrcid()); + assertEquals("0000-0000-0000-0000", email2.get(0).getSource().retrieveSourcePath()); + assertEquals("ORCID email validation", email2.get(0).getSource().getSourceName().getContent()); + assertNull(email2.get(0).getSource().getSourceOrcid()); assertNotNull(personDetails.getPublicGroupedPersonExternalIdentifiers()); Map> extIds = personDetails.getPublicGroupedPersonExternalIdentifiers();