summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/resources/sql/H2RegistrationDAOTest_depopulate.sql5
-rw-r--r--src/main/resources/sql/H2RegistrationDAOTest_populate.sql15
-rw-r--r--src/test/resources/registrationTestBaseData.xml18
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