Skip to content

Commit

Permalink
test: Fix add multiple items modify indexing status tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Palafox committed Jun 6, 2024
1 parent 1fcca3f commit 59cf916
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 59cf916

Please sign in to comment.