generated from it-at-m/oss-repository-en-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #327 from it-at-m/improve-eai-dummy-file
Spaltennamen bei Dummy-Insert-Queries ergänzt
- Loading branch information
Showing
2 changed files
with
47 additions
and
25 deletions.
There are no files selected for viewing
50 changes: 25 additions & 25 deletions
50
wls-eai-service/src/main/resources/db/dummydata/h2/V1_1__wahlvorstandTestdaten.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,74 @@ | ||
INSERT INTO wahlvorstand | ||
INSERT INTO wahlvorstand (id, wahlbezirkID) | ||
VALUES ('00000000-0000-0000-0001-000000000001', '00000000-0000-0000-0000-000000000001'); | ||
INSERT INTO wahlvorstandsmitglied | ||
INSERT INTO wahlvorstandsmitglied (id, vorname, nachname, funktion, anwesend, wahlvorstandID, anwesenheitUpdatedOn) | ||
VALUES ('00000000-0000-0000-0001-000000000001', 'Homer', 'Simpson', 'W', false, '00000000-0000-0000-0001-000000000001', | ||
null); | ||
INSERT INTO wahlvorstandsmitglied | ||
INSERT INTO wahlvorstandsmitglied (id, vorname, nachname, funktion, anwesend, wahlvorstandID, anwesenheitUpdatedOn) | ||
VALUES ('00000000-0000-0000-0001-000000000002', 'Marge', 'Simpson', 'SB', false, '00000000-0000-0000-0001-000000000001', | ||
null); | ||
INSERT INTO wahlvorstandsmitglied | ||
INSERT INTO wahlvorstandsmitglied (id, vorname, nachname, funktion, anwesend, wahlvorstandID, anwesenheitUpdatedOn) | ||
VALUES ('00000000-0000-0000-0001-000000000003', 'Bart', 'Simpson', 'SWB', false, | ||
'00000000-0000-0000-0001-000000000001', null); | ||
INSERT INTO wahlvorstandsmitglied | ||
INSERT INTO wahlvorstandsmitglied (id, vorname, nachname, funktion, anwesend, wahlvorstandID, anwesenheitUpdatedOn) | ||
VALUES ('00000000-0000-0000-0001-000000000004', 'Lisa', 'Simpson', 'SSB', false, '00000000-0000-0000-0001-000000000001', | ||
null); | ||
INSERT INTO wahlvorstandsmitglied | ||
INSERT INTO wahlvorstandsmitglied (id, vorname, nachname, funktion, anwesend, wahlvorstandID, anwesenheitUpdatedOn) | ||
VALUES ('00000000-0000-0000-0001-000000000005', 'Maggie', 'Simpson', 'B', false, '00000000-0000-0000-0001-000000000001', | ||
null); | ||
|
||
INSERT INTO wahlvorstand | ||
INSERT INTO wahlvorstand (id, wahlbezirkID) | ||
VALUES ('00000000-0000-0000-0001-000000000002', '00000000-0000-0000-0000-000000000002'); | ||
INSERT INTO wahlvorstandsmitglied | ||
INSERT INTO wahlvorstandsmitglied (id, vorname, nachname, funktion, anwesend, wahlvorstandID, anwesenheitUpdatedOn) | ||
VALUES ('00000000-0000-0000-0002-000000000001', 'Peter', 'Griffin', 'W', false, '00000000-0000-0000-0001-000000000002', | ||
null); | ||
INSERT INTO wahlvorstandsmitglied | ||
INSERT INTO wahlvorstandsmitglied (id, vorname, nachname, funktion, anwesend, wahlvorstandID, anwesenheitUpdatedOn) | ||
VALUES ('00000000-0000-0000-0002-000000000002', 'Lois', 'Griffin', 'SB', false, '00000000-0000-0000-0001-000000000002', | ||
null); | ||
INSERT INTO wahlvorstandsmitglied | ||
INSERT INTO wahlvorstandsmitglied (id, vorname, nachname, funktion, anwesend, wahlvorstandID, anwesenheitUpdatedOn) | ||
VALUES ('00000000-0000-0000-0002-000000000003', 'Megan', 'Griffin', 'SWB', false, | ||
'00000000-0000-0000-0001-000000000002', null); | ||
INSERT INTO wahlvorstandsmitglied | ||
INSERT INTO wahlvorstandsmitglied (id, vorname, nachname, funktion, anwesend, wahlvorstandID, anwesenheitUpdatedOn) | ||
VALUES ('00000000-0000-0000-0002-000000000004', 'Christopher', 'Griffin', 'SSB', false, | ||
'00000000-0000-0000-0001-000000000002', null); | ||
INSERT INTO wahlvorstandsmitglied | ||
INSERT INTO wahlvorstandsmitglied (id, vorname, nachname, funktion, anwesend, wahlvorstandID, anwesenheitUpdatedOn) | ||
VALUES ('00000000-0000-0000-0002-000000000005', 'Stewie', 'Griffin', 'B', false, '00000000-0000-0000-0001-000000000002', | ||
null); | ||
INSERT INTO wahlvorstandsmitglied | ||
INSERT INTO wahlvorstandsmitglied (id, vorname, nachname, funktion, anwesend, wahlvorstandID, anwesenheitUpdatedOn) | ||
VALUES ('00000000-0000-0000-0002-000000000006', 'Brian', 'Griffin', 'B', false, '00000000-0000-0000-0001-000000000002', | ||
null); | ||
|
||
INSERT INTO wahlvorstand | ||
INSERT INTO wahlvorstand (id, wahlbezirkID) | ||
VALUES ('00000000-0000-0000-0001-000000000003', '00000000-0000-0000-0000-000000000003'); | ||
INSERT INTO wahlvorstandsmitglied | ||
INSERT INTO wahlvorstandsmitglied (id, vorname, nachname, funktion, anwesend, wahlvorstandID, anwesenheitUpdatedOn) | ||
VALUES ('00000000-0000-0000-0003-000000000001', 'Grace', 'Hopper', 'W', false, '00000000-0000-0000-0001-000000000003', | ||
null); | ||
INSERT INTO wahlvorstandsmitglied | ||
INSERT INTO wahlvorstandsmitglied (id, vorname, nachname, funktion, anwesend, wahlvorstandID, anwesenheitUpdatedOn) | ||
VALUES ('00000000-0000-0000-0003-000000000002', 'Ada', 'Lovelace', 'SB', false, | ||
'00000000-0000-0000-0001-000000000003', null); | ||
INSERT INTO wahlvorstandsmitglied | ||
INSERT INTO wahlvorstandsmitglied (id, vorname, nachname, funktion, anwesend, wahlvorstandID, anwesenheitUpdatedOn) | ||
VALUES ('00000000-0000-0000-0003-000000000003', 'Konrad', 'Zuse', 'SWB', false, | ||
'00000000-0000-0000-0001-000000000003', null); | ||
INSERT INTO wahlvorstandsmitglied | ||
INSERT INTO wahlvorstandsmitglied (id, vorname, nachname, funktion, anwesend, wahlvorstandID, anwesenheitUpdatedOn) | ||
VALUES ('00000000-0000-0000-0003-000000000004', 'Alan', 'Turing', 'SSB', false, | ||
'00000000-0000-0000-0001-000000000003', null); | ||
INSERT INTO wahlvorstandsmitglied | ||
INSERT INTO wahlvorstandsmitglied (id, vorname, nachname, funktion, anwesend, wahlvorstandID, anwesenheitUpdatedOn) | ||
VALUES ('00000000-0000-0000-0003-000000000005', 'Hedy', 'Lamarr', 'B', false, | ||
'00000000-0000-0000-0001-000000000003', null); | ||
|
||
INSERT INTO wahlvorstand | ||
INSERT INTO wahlvorstand (id, wahlbezirkID) | ||
VALUES ('00000000-0000-0000-0001-000000000004', '00000000-0000-0000-0000-000000000004'); | ||
INSERT INTO wahlvorstandsmitglied | ||
INSERT INTO wahlvorstandsmitglied (id, vorname, nachname, funktion, anwesend, wahlvorstandID, anwesenheitUpdatedOn) | ||
VALUES ('00000000-0000-0000-0004-000000000001', 'Diana', 'Prince', 'W', false, '00000000-0000-0000-0001-000000000004', | ||
null); | ||
INSERT INTO wahlvorstandsmitglied | ||
INSERT INTO wahlvorstandsmitglied (id, vorname, nachname, funktion, anwesend, wahlvorstandID, anwesenheitUpdatedOn) | ||
VALUES ('00000000-0000-0000-0004-000000000002', 'Clark', 'Kent', 'SB', false, '00000000-0000-0000-0001-000000000004', | ||
null); | ||
INSERT INTO wahlvorstandsmitglied | ||
INSERT INTO wahlvorstandsmitglied (id, vorname, nachname, funktion, anwesend, wahlvorstandID, anwesenheitUpdatedOn) | ||
VALUES ('00000000-0000-0000-0004-000000000003', 'Bruce', 'Wayne', 'SWB', false, | ||
'00000000-0000-0000-0001-000000000004', null); | ||
INSERT INTO wahlvorstandsmitglied | ||
INSERT INTO wahlvorstandsmitglied (id, vorname, nachname, funktion, anwesend, wahlvorstandID, anwesenheitUpdatedOn) | ||
VALUES ('00000000-0000-0000-0004-000000000004', 'Barry', 'Allen', 'SSB', false, '00000000-0000-0000-0001-000000000004', | ||
null); | ||
INSERT INTO wahlvorstandsmitglied | ||
INSERT INTO wahlvorstandsmitglied (id, vorname, nachname, funktion, anwesend, wahlvorstandID, anwesenheitUpdatedOn) | ||
VALUES ('00000000-0000-0000-0004-000000000005', 'Arthur', 'Curry', 'B', false, '00000000-0000-0000-0001-000000000004', | ||
null); |
22 changes: 22 additions & 0 deletions
22
...nchen/oss/wahllokalsystem/eaiservice/MicroServiceApplicationDummyDataIntegrationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
|
||
} |