From: Kai Moritz Date: Wed, 16 Aug 2017 08:37:49 +0000 (+0200) Subject: Added test, that configure the JPA-mapping with XML-configuration-files X-Git-Tag: jpa-converters-1.0.0~7 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=40f11af561b8e0095f2c4cfbbd2f87988fef93d7;p=jpa-converters Added test, that configure the JPA-mapping with XML-configuration-files --- diff --git a/src/test/java/de/juplo/jpa/converters/JPAConverterTest.java b/src/test/java/de/juplo/jpa/converters/JPAConverterTest.java index 79e4405..c9f87cf 100644 --- a/src/test/java/de/juplo/jpa/converters/JPAConverterTest.java +++ b/src/test/java/de/juplo/jpa/converters/JPAConverterTest.java @@ -43,6 +43,13 @@ public class JPAConverterTest testOffsetDateTime(); } + @Test + public void testOffsetDateTimeXml() + { + em = Persistence.createEntityManagerFactory("xml").createEntityManager(); + testOffsetDateTime(); + } + public void testOffsetDateTime() { EierlegendeWollmilchSau ews; @@ -63,6 +70,7 @@ public class JPAConverterTest assertEquals(odt.toInstant(), ews.odt.toInstant()); } + @Test public void testZonedDateTimeAnnotated() { @@ -70,6 +78,13 @@ public class JPAConverterTest testZonedDateTime(); } + @Test + public void testZonedDateTimeXml() + { + em = Persistence.createEntityManagerFactory("xml").createEntityManager(); + testZonedDateTime(); + } + public void testZonedDateTime() { EierlegendeWollmilchSau ews; diff --git a/src/test/resources/META-INF/mapping.xml b/src/test/resources/META-INF/mapping.xml new file mode 100644 index 0000000..6b49b11 --- /dev/null +++ b/src/test/resources/META-INF/mapping.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + diff --git a/src/test/resources/META-INF/persistence.xml b/src/test/resources/META-INF/persistence.xml index f6fffeb..603cd73 100644 --- a/src/test/resources/META-INF/persistence.xml +++ b/src/test/resources/META-INF/persistence.xml @@ -18,4 +18,19 @@ + + Classes are mapped with XML-configuration-files + META-INF/mapping.xml + true + + + + + + + + + + +