From 5ee8c413c68a0b3bce5644fe3d1b86c6883e52f0 Mon Sep 17 00:00:00 2001 From: MrSebastian <13592751+MrSebastian@users.noreply.github.com> Date: Tue, 2 Jul 2024 09:27:49 +0200 Subject: [PATCH] add integrationtest to verify dummydata is valid (for h2) --- ...ceApplicationDummyDataIntegrationTest.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 wls-eai-service/src/test/java/de/muenchen/oss/wahllokalsystem/eaiservice/MicroServiceApplicationDummyDataIntegrationTest.java diff --git a/wls-eai-service/src/test/java/de/muenchen/oss/wahllokalsystem/eaiservice/MicroServiceApplicationDummyDataIntegrationTest.java b/wls-eai-service/src/test/java/de/muenchen/oss/wahllokalsystem/eaiservice/MicroServiceApplicationDummyDataIntegrationTest.java new file mode 100644 index 00000000..caf463a9 --- /dev/null +++ b/wls-eai-service/src/test/java/de/muenchen/oss/wahllokalsystem/eaiservice/MicroServiceApplicationDummyDataIntegrationTest.java @@ -0,0 +1,22 @@ +package de.muenchen.oss.wahllokalsystem.eaiservice; + +import de.muenchen.oss.wahllokalsystem.eaiservice.domain.wahlvorstand.WahlvorstandRepository; +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.ActiveProfiles; + +@SpringBootTest(classes = MicroServiceApplication.class) +@ActiveProfiles({ TestConstants.SPRING_TEST_PROFILE, TestConstants.SPRING_NO_SECURITY_PROFILE, "db-h2", "db-dummydata" }) +class MicroServiceApplicationDummyDataIntegrationTest { + + @Autowired + WahlvorstandRepository wahlvorstandRepository; + + @Test + void applicationIsRunningAndHasDummyData() { + Assertions.assertThat(wahlvorstandRepository.count()).isGreaterThan(0); + } + +} \ No newline at end of file