Skip to content

Commit

Permalink
πŸ› Forgot to rename the test #8
Browse files Browse the repository at this point in the history
Signed-off-by: Marcus Fihlon <[email protected]>
  • Loading branch information
McPringle committed Dec 22, 2024
1 parent cb261f7 commit 0e489c9
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

class EventListTest {
class EventOverviewTest {

@Test
void happyCase() {
final var databaseService = mock(DatabaseService.class);
when(databaseService.getUpcomingEvents())
.thenReturn(Stream.of(new EventSummaryData(42L, "Test Name", LocalDateTime.MAX, "Test Location")));

final var eventList = new EventOverview(databaseService);
assertEquals(1, eventList.getChildren().count());
assertInstanceOf(EventSummary.class, eventList.getChildren().findFirst().orElseThrow());
final var eventOverview = new EventOverview(databaseService);
assertEquals(1, eventOverview.getChildren().count());
assertInstanceOf(EventSummary.class, eventOverview.getChildren().findFirst().orElseThrow());
}

}

0 comments on commit 0e489c9

Please sign in to comment.