From 7104f9bf07991ab3a83717d2e699db6686f8fcb0 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Tue, 7 Feb 2017 13:41:14 +0100 Subject: [PATCH] The generated schema is checked for it hmp-testclasses-annotationscanning --- .../create-schema.ddl | 23 +++++++++++++++++++ .../drop-schema.ddl | 6 +++++ .../verify.bsh | 9 ++++++++ 3 files changed, 38 insertions(+) create mode 100644 src/it/hmp-testclasses-annotationscanning/create-schema.ddl create mode 100644 src/it/hmp-testclasses-annotationscanning/drop-schema.ddl create mode 100644 src/it/hmp-testclasses-annotationscanning/verify.bsh diff --git a/src/it/hmp-testclasses-annotationscanning/create-schema.ddl b/src/it/hmp-testclasses-annotationscanning/create-schema.ddl new file mode 100644 index 00000000..88001a6e --- /dev/null +++ b/src/it/hmp-testclasses-annotationscanning/create-schema.ddl @@ -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 index 00000000..1a24e12d --- /dev/null +++ b/src/it/hmp-testclasses-annotationscanning/drop-schema.ddl @@ -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 index 00000000..8a9563d0 --- /dev/null +++ b/src/it/hmp-testclasses-annotationscanning/verify.bsh @@ -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; -- 2.20.1