From 59cf916afc8152388da42fe8a44dda59c79ea9fd Mon Sep 17 00:00:00 2001 From: Daniel Palafox Date: Thu, 6 Jun 2024 18:15:13 -0500 Subject: [PATCH] test: Fix add multiple items modify indexing status tests --- .../org/orcid/core/manager/PeerReviewManagerTest.java | 10 +++++----- .../orcid/core/manager/ProfileFundingManagerTest.java | 2 +- .../java/org/orcid/core/manager/WorkManagerTest.java | 2 +- .../orcid/core/manager/v3/PeerReviewManagerTest.java | 2 +- .../core/manager/v3/ProfileFundingManagerTest.java | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/orcid-core/src/test/java/org/orcid/core/manager/PeerReviewManagerTest.java b/orcid-core/src/test/java/org/orcid/core/manager/PeerReviewManagerTest.java index 033e6cee63d..adb8b4c3592 100644 --- a/orcid-core/src/test/java/org/orcid/core/manager/PeerReviewManagerTest.java +++ b/orcid-core/src/test/java/org/orcid/core/manager/PeerReviewManagerTest.java @@ -137,7 +137,7 @@ public void testAddMultipleModifiesIndexingStatus() { assertNotNull(entity1.getDisplayIndex()); assertNotNull(entity2.getDisplayIndex()); assertNotNull(entity3.getDisplayIndex()); - assertEquals(Long.valueOf(0), entity3.getDisplayIndex()); + assertEquals(Long.valueOf(1), entity3.getDisplayIndex()); // Rollback all changes peerReviewDao.remove(entity1.getId()); @@ -146,25 +146,25 @@ public void testAddMultipleModifiesIndexingStatus() { } @Test - public void displayIndexIsSetTo_1_FromUI() { + public void displayIndexIsSetTo_0_FromUI() { when(sourceManager.retrieveSourceEntity()).thenReturn(new SourceEntity(new ClientDetailsEntity(CLIENT_1_ID))); PeerReview p1 = getPeerReview("fromUI-1"); p1 = peerReviewManager.createPeerReview(claimedOrcid, p1, false); PeerReviewEntity p = peerReviewDao.find(p1.getPutCode()); assertNotNull(p); - assertEquals(Long.valueOf(1), p.getDisplayIndex()); + assertEquals(Long.valueOf(0), p.getDisplayIndex()); } @Test - public void displayIndexIsSetTo_0_FromAPI() { + public void displayIndexIsSetTo_1_FromAPI() { when(sourceManager.retrieveSourceEntity()).thenReturn(new SourceEntity(new ClientDetailsEntity(CLIENT_1_ID))); PeerReview p1 = getPeerReview("fromAPI-1"); p1 = peerReviewManager.createPeerReview(claimedOrcid, p1, true); PeerReviewEntity p = peerReviewDao.find(p1.getPutCode()); assertNotNull(91); - assertEquals(Long.valueOf(0), p.getDisplayIndex()); + assertEquals(Long.valueOf(1), p.getDisplayIndex()); } @Test diff --git a/orcid-core/src/test/java/org/orcid/core/manager/ProfileFundingManagerTest.java b/orcid-core/src/test/java/org/orcid/core/manager/ProfileFundingManagerTest.java index 804afbd08b7..13650551506 100644 --- a/orcid-core/src/test/java/org/orcid/core/manager/ProfileFundingManagerTest.java +++ b/orcid-core/src/test/java/org/orcid/core/manager/ProfileFundingManagerTest.java @@ -125,7 +125,7 @@ public void testAddMultipleModifiesIndexingStatus() { assertNotNull(entity1.getDisplayIndex()); assertNotNull(entity2.getDisplayIndex()); assertNotNull(entity3.getDisplayIndex()); - assertEquals(Long.valueOf(0), entity3.getDisplayIndex()); + assertEquals(Long.valueOf(1), entity3.getDisplayIndex()); // Rollback all changes profileFundingDao.remove(entity1.getId()); diff --git a/orcid-core/src/test/java/org/orcid/core/manager/WorkManagerTest.java b/orcid-core/src/test/java/org/orcid/core/manager/WorkManagerTest.java index cee49648226..99ab4226e39 100644 --- a/orcid-core/src/test/java/org/orcid/core/manager/WorkManagerTest.java +++ b/orcid-core/src/test/java/org/orcid/core/manager/WorkManagerTest.java @@ -212,7 +212,7 @@ public void testAddMultipleModifiesIndexingStatus() { assertNotNull(entity1.getDisplayIndex()); assertNotNull(entity2.getDisplayIndex()); assertNotNull(entity3.getDisplayIndex()); - assertEquals(Long.valueOf(0), entity3.getDisplayIndex()); + assertEquals(Long.valueOf(1), entity3.getDisplayIndex()); // Rollback all changes workDao.remove(entity1.getId()); diff --git a/orcid-core/src/test/java/org/orcid/core/manager/v3/PeerReviewManagerTest.java b/orcid-core/src/test/java/org/orcid/core/manager/v3/PeerReviewManagerTest.java index 888070b58bc..45055260732 100644 --- a/orcid-core/src/test/java/org/orcid/core/manager/v3/PeerReviewManagerTest.java +++ b/orcid-core/src/test/java/org/orcid/core/manager/v3/PeerReviewManagerTest.java @@ -192,7 +192,7 @@ public void testAddMultipleModifiesIndexingStatus() { assertNotNull(entity1.getDisplayIndex()); assertNotNull(entity2.getDisplayIndex()); assertNotNull(entity3.getDisplayIndex()); - assertEquals(Long.valueOf(0), entity3.getDisplayIndex()); + assertEquals(Long.valueOf(1), entity3.getDisplayIndex()); //Rollback all changes peerReviewDao.remove(entity1.getId()); diff --git a/orcid-core/src/test/java/org/orcid/core/manager/v3/ProfileFundingManagerTest.java b/orcid-core/src/test/java/org/orcid/core/manager/v3/ProfileFundingManagerTest.java index 75d463427ef..27da969c320 100644 --- a/orcid-core/src/test/java/org/orcid/core/manager/v3/ProfileFundingManagerTest.java +++ b/orcid-core/src/test/java/org/orcid/core/manager/v3/ProfileFundingManagerTest.java @@ -181,7 +181,7 @@ public void testAddMultipleModifiesIndexingStatus() { assertNotNull(entity1.getDisplayIndex()); assertNotNull(entity2.getDisplayIndex()); assertNotNull(entity3.getDisplayIndex()); - assertEquals(Long.valueOf(0), entity3.getDisplayIndex()); + assertEquals(Long.valueOf(1), entity3.getDisplayIndex()); //Rollback all changes profileFundingDao.remove(entity1.getId());