From: Kai Moritz Date: Tue, 15 Aug 2017 18:13:52 +0000 (+0200) Subject: Prepared for the addition of a second persistence-unit X-Git-Tag: jpa-converters-1.0.0~10 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=8ba1e56029cd19e7208cb0ff1d5cb27c4e9691f9;p=jpa-converters Prepared for the addition of a second persistence-unit --- diff --git a/src/test/java/de/juplo/jpa/converters/JPAConverterTest.java b/src/test/java/de/juplo/jpa/converters/JPAConverterTest.java index 38b84e3..79e4405 100644 --- a/src/test/java/de/juplo/jpa/converters/JPAConverterTest.java +++ b/src/test/java/de/juplo/jpa/converters/JPAConverterTest.java @@ -24,8 +24,7 @@ public class JPAConverterTest final static Logger log = LoggerFactory.getLogger(JPAConverterTest.class); - EntityManager em = - Persistence.createEntityManagerFactory("test").createEntityManager(); + EntityManager em; ZonedDateTime zdt = ZonedDateTime.now(); OffsetDateTime odt = OffsetDateTime.now(); @@ -38,6 +37,12 @@ public class JPAConverterTest @Test + public void testOffsetDateTimeAnnotated() + { + em = Persistence.createEntityManagerFactory("annotated").createEntityManager(); + testOffsetDateTime(); + } + public void testOffsetDateTime() { EierlegendeWollmilchSau ews; @@ -59,6 +64,12 @@ public class JPAConverterTest } @Test + public void testZonedDateTimeAnnotated() + { + em = Persistence.createEntityManagerFactory("annotated").createEntityManager(); + testZonedDateTime(); + } + public void testZonedDateTime() { EierlegendeWollmilchSau ews; diff --git a/src/test/resources/META-INF/persistence.xml b/src/test/resources/META-INF/persistence.xml index 75ee68d..1de7f0a 100644 --- a/src/test/resources/META-INF/persistence.xml +++ b/src/test/resources/META-INF/persistence.xml @@ -4,7 +4,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0"> - + de.juplo.jpa.converters.OffsetDateTime de.juplo.jpa.converters.ZonedDateTime