From 8ba1e56029cd19e7208cb0ff1d5cb27c4e9691f9 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Tue, 15 Aug 2017 20:13:52 +0200 Subject: [PATCH] Prepared for the addition of a second persistence-unit --- .../de/juplo/jpa/converters/JPAConverterTest.java | 15 +++++++++++++-- src/test/resources/META-INF/persistence.xml | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) 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 -- 2.20.1