From 0f300ece2e099cff9c29e7f6004dbb8a05ff7e39 Mon Sep 17 00:00:00 2001 From: Grzegorz Piwowarek Date: Sat, 29 Apr 2017 20:10:52 +0200 Subject: [PATCH] JDO -> Integration (#1752) * JDOIntegration * JDOIntegration --- ...st.java => GuideToJDOIntegrationTest.java} | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) rename core-java/src/test/java/com/baeldung/jdo/{GuideToJDOTest.java => GuideToJDOIntegrationTest.java} (97%) diff --git a/core-java/src/test/java/com/baeldung/jdo/GuideToJDOTest.java b/core-java/src/test/java/com/baeldung/jdo/GuideToJDOIntegrationTest.java similarity index 97% rename from core-java/src/test/java/com/baeldung/jdo/GuideToJDOTest.java rename to core-java/src/test/java/com/baeldung/jdo/GuideToJDOIntegrationTest.java index b8a8d2adb3..65f89d75b2 100644 --- a/core-java/src/test/java/com/baeldung/jdo/GuideToJDOTest.java +++ b/core-java/src/test/java/com/baeldung/jdo/GuideToJDOIntegrationTest.java @@ -1,21 +1,20 @@ package com.baeldung.jdo; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; - -import java.util.Iterator; -import java.util.List; - -import javax.jdo.PersistenceManager; -import javax.jdo.PersistenceManagerFactory; -import javax.jdo.Query; -import javax.jdo.Transaction; - import org.datanucleus.api.jdo.JDOPersistenceManagerFactory; import org.datanucleus.metadata.PersistenceUnitMetaData; import org.junit.Test; -public class GuideToJDOTest { +import javax.jdo.PersistenceManager; +import javax.jdo.PersistenceManagerFactory; +import javax.jdo.Query; +import javax.jdo.Transaction; +import java.util.Iterator; +import java.util.List; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; + +public class GuideToJDOIntegrationTest { @Test public void givenProduct_WhenNewThenPerformTransaction() { PersistenceUnitMetaData pumd = new PersistenceUnitMetaData("dynamic-unit", "RESOURCE_LOCAL", null); @@ -34,8 +33,7 @@ public class GuideToJDOTest { tx.begin(); for (int i = 0; i < 100; i++){ String nam = "Product-" + i; - double price = i; - Product productx = new Product(nam, price); + Product productx = new Product(nam, (double) i); pm.makePersistent(productx); } tx.commit();