Skip to content

Commit

Permalink
unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
mmmateos committed Jan 11, 2024
1 parent 9197bc4 commit 6ad8de9
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,27 @@ class EventDetailsRepositoryTest {
d2.eventModule().events()
.byEnrollmentUid().eq(ENROLLMENT_UID)
.byProgramStageUid().eq(PROGRAM_STAGE_UID)
.byDeleted(),
) doReturn mock()
whenever(
d2.eventModule().events()
.byEnrollmentUid().eq(ENROLLMENT_UID)
.byProgramStageUid().eq(PROGRAM_STAGE_UID)
.byDeleted().isFalse,
) doReturn mock()
whenever(
d2.eventModule().events()
.byEnrollmentUid().eq(ENROLLMENT_UID)
.byProgramStageUid().eq(PROGRAM_STAGE_UID)
.byDeleted().isFalse
.orderByEventDate(DESC),
) doReturn mock()

whenever(
d2.eventModule().events()
.byEnrollmentUid().eq(ENROLLMENT_UID)
.byProgramStageUid().eq(PROGRAM_STAGE_UID)
.byDeleted().isFalse
.orderByDueDate(DESC),
) doReturn mock()
}
Expand Down Expand Up @@ -97,13 +111,15 @@ class EventDetailsRepositoryTest {
d2.eventModule().events()
.byEnrollmentUid().eq(ENROLLMENT_UID)
.byProgramStageUid().eq(PROGRAM_STAGE_UID)
.byDeleted().isFalse
.orderByEventDate(DESC)
.blockingGet(),
) doReturn listOf(event)
whenever(
d2.eventModule().events()
.byEnrollmentUid().eq(ENROLLMENT_UID)
.byProgramStageUid().eq(PROGRAM_STAGE_UID)
.byDeleted().isFalse
.orderByDueDate(DESC)
.blockingGet(),
) doReturn emptyList()
Expand All @@ -120,13 +136,15 @@ class EventDetailsRepositoryTest {
d2.eventModule().events()
.byEnrollmentUid().eq(ENROLLMENT_UID)
.byProgramStageUid().eq(PROGRAM_STAGE_UID)
.byDeleted().isFalse
.orderByEventDate(DESC)
.blockingGet(),
) doReturn emptyList()
whenever(
d2.eventModule().events()
.byEnrollmentUid().eq(ENROLLMENT_UID)
.byProgramStageUid().eq(PROGRAM_STAGE_UID)
.byDeleted().isFalse
.orderByDueDate(DESC)
.blockingGet(),
) doReturn listOf(event)
Expand Down

0 comments on commit 6ad8de9

Please sign in to comment.