diff options
Diffstat (limited to 'model/context-model/src')
-rw-r--r-- | model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/ApexContextModelTest.java | 19 | ||||
-rw-r--r-- | model/context-model/src/test/resources/META-INF/persistence.xml | 6 |
2 files changed, 4 insertions, 21 deletions
diff --git a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/ApexContextModelTest.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/ApexContextModelTest.java index 948c2024c..f41c39fd2 100644 --- a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/ApexContextModelTest.java +++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/ApexContextModelTest.java @@ -22,11 +22,6 @@ package org.onap.policy.apex.model.contextmodel.handling; import static org.junit.Assert.assertTrue; -import java.io.File; -import java.sql.Connection; -import java.sql.DriverManager; - -import org.junit.After; import org.junit.Before; import org.junit.Test; import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult; @@ -36,33 +31,23 @@ import org.onap.policy.apex.model.contextmodel.concepts.AxContextModel; /** * Apex context model tests. - * + * * @author liam * */ public class ApexContextModelTest { - private Connection connection; TestApexModel<AxContextModel> testApexModel; /** * Set up tests. - * + * * @throws Exception a testing exception */ @Before public void setup() throws Exception { - Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance(); - connection = DriverManager.getConnection("jdbc:derby:memory:apex_test;create=true"); - testApexModel = new TestApexModel<AxContextModel>(AxContextModel.class, new TestApexContextModelCreator()); } - @After - public void teardown() throws Exception { - connection.close(); - new File("derby.log").delete(); - } - @Test public void testModelValid() throws Exception { final AxValidationResult result = testApexModel.testApexModelValid(); diff --git a/model/context-model/src/test/resources/META-INF/persistence.xml b/model/context-model/src/test/resources/META-INF/persistence.xml index b7911caa2..b4ba68a38 100644 --- a/model/context-model/src/test/resources/META-INF/persistence.xml +++ b/model/context-model/src/test/resources/META-INF/persistence.xml @@ -38,10 +38,8 @@ <class>org.onap.policy.apex.model.contextmodel.concepts.AxContextModel</class> <properties> - <property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:apex_test" /> - <property name="javax.persistence.target-database" value="Derby" /> - <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver" /> - + <property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:testdb" /> + <property name="javax.persistence.jdbc.driver" value="org.h2.Driver" /> <property name="eclipselink.ddl-generation" value="drop-and-create-tables" /> <property name="eclipselink.ddl-generation.output-mode" value="database" /> <property name="eclipselink.logging.level" value="INFO" /> |