diff options
author | Dominic Rogetzer <e1627756@student.tuwien.ac.at> | 2018-06-11 15:02:26 +0200 |
---|---|---|
committer | Tharre <tharre3@gmail.com> | 2018-06-11 18:15:42 +0200 |
commit | 80e1aaf4a0eba29a7dd304aa52c1116d76c417fc (patch) | |
tree | 81f7b9614cb064619cb883891851c4b543939147 | |
parent | 0aa0eb12a6b96f5fe4cb8b21582799e233e9788c (diff) | |
download | sepm-groupproject-80e1aaf4a0eba29a7dd304aa52c1116d76c417fc.tar.gz sepm-groupproject-80e1aaf4a0eba29a7dd304aa52c1116d76c417fc.tar.xz sepm-groupproject-80e1aaf4a0eba29a7dd304aa52c1116d76c417fc.zip |
Refactor insert/delete scripts to DB-Unit xml file [#27302]
3 files changed, 18 insertions, 20 deletions
diff --git a/src/main/resources/sql/H2RegistrationDAOTest_depopulate.sql b/src/main/resources/sql/H2RegistrationDAOTest_depopulate.sql deleted file mode 100644 index f43b641..0000000 --- a/src/main/resources/sql/H2RegistrationDAOTest_depopulate.sql +++ /dev/null @@ -1,5 +0,0 @@ -DELETE FROM Registration; -DELETE FROM Vehicle; -DELETE FROM VehicleVersion; -DELETE FROM Employee; -DELETE FROM EmployeeVersion;
\ No newline at end of file diff --git a/src/main/resources/sql/H2RegistrationDAOTest_populate.sql b/src/main/resources/sql/H2RegistrationDAOTest_populate.sql deleted file mode 100644 index 7e7b428..0000000 --- a/src/main/resources/sql/H2RegistrationDAOTest_populate.sql +++ /dev/null @@ -1,15 +0,0 @@ -DELETE FROM Registration; -DELETE FROM Vehicle; -DELETE FROM VehicleVersion; -DELETE FROM Employee; -DELETE FROM EmployeeVersion; -INSERT INTO EmployeeVersion (id, name, birthday, educationLevel, isDriver, isPilot) VALUES (1, 'John Doe', '2000-01-01', 'RS', TRUE, TRUE); -INSERT INTO EmployeeVersion (id, name, birthday, educationLevel, isDriver, isPilot) VALUES (2, 'Nick "Kage" Verily', '1990-01-01', 'NKV', TRUE, FALSE); -INSERT INTO EmployeeVersion (id, name, birthday, educationLevel, isDriver, isPilot) VALUES (3, 'Nicht Arzt', '1980-01-01', 'NA', FALSE, FALSE); -INSERT INTO Employee (id, version) VALUES (1, 1); -INSERT INTO Employee (id, version) VALUES (2, 2); -INSERT INTO Employee (id, version) VALUES (3, 3); -INSERT INTO VehicleVersion (id, name, hasNef, constructionType, type) VALUES (1, 'RTW-1', TRUE, 'HOCHDACH', 'RTW'); -INSERT INTO VehicleVersion (id, name, hasNef, constructionType, type) VALUES (2, 'NEF-1', FALSE, 'NORMAL', 'NEF'); -INSERT INTO Vehicle (id, version, status) VALUES (1, 1, 'ABGEMELDET'); -INSERT INTO Vehicle (id, version, status) VALUES (2, 2, 'ABGEMELDET');
\ No newline at end of file diff --git a/src/test/resources/registrationTestBaseData.xml b/src/test/resources/registrationTestBaseData.xml new file mode 100644 index 0000000..7ef1912 --- /dev/null +++ b/src/test/resources/registrationTestBaseData.xml @@ -0,0 +1,18 @@ +<dataset> + <EmployeeVersion id="1" name="John Doe" birthday="2000-01-01" educationLevel="RS" isDriver="true" + isPilot="false"/> + <EmployeeVersion id="2" name="Nick Verily" birthday="1990-01-01" educationLevel="NKV" + isDriver="true" isPilot="false"/> + <EmployeeVersion id="3" name="Nicht Arzt" birthday="1980-01-01" educationLevel="NA" + isDriver="false" isPilot="false"/> + + <Employee id="1" version="1"/> + <Employee id="2" version="2"/> + <Employee id="3" version="3"/> + + <VehicleVersion id="1" name="RTW-1" hasNef="true" constructionType="HOCHDACH" type="RTW"/> + <VehicleVersion id="2" name="NEF-1" hasNef="false" constructionType="NORMAL" type="NEF"/> + + <Vehicle id="1" version="1" status="ABGEMELDET"/> + <Vehicle id="2" version="2" status="ABGEMELDET"/> +</dataset>
\ No newline at end of file |