The generated schema is checked for it hmp-testclasses-annotationscanning
authorKai Moritz <kai@juplo.de>
Tue, 7 Feb 2017 12:41:14 +0000 (13:41 +0100)
committerKai Moritz <kai@juplo.de>
Tue, 7 Feb 2017 12:41:14 +0000 (13:41 +0100)
src/it/hmp-testclasses-annotationscanning/create-schema.ddl [new file with mode: 0644]
src/it/hmp-testclasses-annotationscanning/drop-schema.ddl [new file with mode: 0644]
src/it/hmp-testclasses-annotationscanning/verify.bsh [new file with mode: 0644]

diff --git a/src/it/hmp-testclasses-annotationscanning/create-schema.ddl b/src/it/hmp-testclasses-annotationscanning/create-schema.ddl
new file mode 100644 (file)
index 0000000..88001a6
--- /dev/null
@@ -0,0 +1,23 @@
+create sequence HMP_SEQ start with 1 increment by 1;
+
+    create table HMP_FACHGEBIET (
+        ID bigint not null,
+        GEAENDERT_AM timestamp,
+        GEAENDERT_VON varchar(255),
+        ERSTELLT_AM timestamp,
+        ERSTELLT_VON varchar(255),
+        CODE varchar(255) not null,
+        NAME varchar(255) not null,
+        VERSION bigint,
+        primary key (ID)
+    );
+
+    create table HMP_UCI_TEST_ENTITY (
+        ID bigint not null,
+        GEAENDERT_AM timestamp,
+        GEAENDERT_VON varchar(255),
+        ERSTELLT_AM timestamp,
+        ERSTELLT_VON varchar(255),
+        NAME varchar(255) not null,
+        primary key (ID)
+    );
diff --git a/src/it/hmp-testclasses-annotationscanning/drop-schema.ddl b/src/it/hmp-testclasses-annotationscanning/drop-schema.ddl
new file mode 100644 (file)
index 0000000..1a24e12
--- /dev/null
@@ -0,0 +1,6 @@
+
+    drop table HMP_FACHGEBIET if exists;
+
+    drop table HMP_UCI_TEST_ENTITY if exists;
+
+    drop sequence if exists HMP_SEQ;
diff --git a/src/it/hmp-testclasses-annotationscanning/verify.bsh b/src/it/hmp-testclasses-annotationscanning/verify.bsh
new file mode 100644 (file)
index 0000000..8a9563d
--- /dev/null
@@ -0,0 +1,9 @@
+import de.juplo.test.FileComparator;
+
+
+FileComparator comparator = new FileComparator(basedir);
+
+if (!comparator.isEqual("drop-schema.ddl","target/db-schema/drop-schema.ddl"))
+  return false;
+if (!comparator.isEqual("create-schema.ddl","target/db-schema/create-schema.ddl"))
+  return false;