Skip to content

Commit

Permalink
Merge pull request #106 from bcgov/fix/changeMergeQuery
Browse files Browse the repository at this point in the history
change merge direction
  • Loading branch information
eckermania authored Oct 24, 2024
2 parents 7e9a677 + a138b5c commit cf76e80
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public byte[] handleGetMergeInDateRangeEvent(@NonNull final Event event) throws
}
}

final List<StudentMergeEntity> mergeEntities = this.getStudentMergeService().findStudentMerges(createDateStart, createDateEnd, StudentMergeDirectionCodes.FROM.getCode());
final List<StudentMergeEntity> mergeEntities = this.getStudentMergeService().findStudentMerges(createDateStart, createDateEnd, StudentMergeDirectionCodes.TO.getCode());

final Event newEvent = Event.builder()
.sagaId(event.getSagaId())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public void testHandleGetMergeEvent_givenStudentId_whenSuccessfullyProcessed_sho
@Test
public void testHandleGetMergeInDateRangeEvent_givenDateRange_whenSuccessfullyProcessed_shouldHaveEventOutcomeMERGE_FOUND() throws JsonProcessingException {
final var studentMerge = mapper.toModel(createStudentMergePayload());
studentMerge.setStudentMergeDirectionCode(StudentMergeDirectionCodes.FROM.getCode());
studentMerge.setStudentMergeDirectionCode(StudentMergeDirectionCodes.TO.getCode());
studentMerge.setCreateDate(LocalDateTime.now().minusDays(5));
this.studentMergeRepository.save(studentMerge);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public void testHandleGetMergeEvent_givenStudentIdPayload_whenSuccessfullyProces
@Test
public void testHandleGetMergeInDateRangeEvent_givenDateRangePayload_whenSuccessfullyProcessed_shouldHaveEventOutcomeMERGE_FOUND() throws JsonProcessingException {
final var studentMerge = this.createStudentMergePayload();
studentMerge.setStudentMergeDirectionCode(StudentMergeDirectionCodes.FROM.getCode());
studentMerge.setStudentMergeDirectionCode(StudentMergeDirectionCodes.TO.getCode());
var studentMergeEntity = mapper.toModel(studentMerge);
studentMergeEntity.setCreateDate(LocalDateTime.now().minusDays(1));
this.studentMergeRepository.save(studentMergeEntity);
Expand Down

0 comments on commit cf76e80

Please sign in to comment.