Skip to content

Commit

Permalink
solve test bug in PickingHUsRepositoryTests
Browse files Browse the repository at this point in the history
518: Picking prototype (v6) 

Task-Url: #518
  • Loading branch information
metas-ts committed Jul 24, 2017
1 parent 201b203 commit 47ae132
Showing 1 changed file with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ public static String[] pickingCandidateStates()
{
X_M_Picking_Candidate.STATUS_IP,
X_M_Picking_Candidate.STATUS_PR,
X_M_Picking_Candidate.STATUS_CL };
X_M_Picking_Candidate.STATUS_CL
};
}

@Before
Expand Down Expand Up @@ -106,10 +107,19 @@ public void testRetrieveHUsIndexedByPickingSlotId(@NonNull final String pickingC

final PickingHUsRepository pickingHUsRepository = new PickingHUsRepository(huEditorViewRepository);
final ListMultimap<Integer, PickingSlotHUEditorRow> result = pickingHUsRepository.retrieveHUsIndexedByPickingSlotId(PickingSlotRepoQuery.of(M_SHIPMENT_SCHEDULE_ID));
assertThat(result.size(), is(1));
assertThat(result.get(M_PICKINGSLOT_ID).size(), is(1));

final boolean expectedProcessed = !X_M_Picking_Candidate.STATUS_IP.equals(pickingCandidateStatus);
assertThat(result.get(M_PICKINGSLOT_ID).get(0), is(new PickingSlotHUEditorRow(huEditorRow, expectedProcessed)));
if (X_M_Picking_Candidate.STATUS_CL.equals(pickingCandidateStatus))
{
// if 'pickingCandidate' is "closed", then nothing shall be returned
assertThat(result.size(), is(0));
}
else
{
assertThat(result.size(), is(1));
assertThat(result.get(M_PICKINGSLOT_ID).size(), is(1));

final boolean expectedProcessed = !X_M_Picking_Candidate.STATUS_IP.equals(pickingCandidateStatus);
assertThat(result.get(M_PICKINGSLOT_ID).get(0), is(new PickingSlotHUEditorRow(huEditorRow, expectedProcessed)));
}
}
}

0 comments on commit 47ae132

Please sign in to comment.