From 8a26f57269caf7a559deb46077050048da92dca8 Mon Sep 17 00:00:00 2001 From: liamfallon Date: Fri, 12 Apr 2019 12:44:22 +0000 Subject: UNit test and minor fixes for DB pars Add unit test for the new database provider driver parameter. Address the comments raised in the last review. Issue-ID: POLICY-1095 Change-Id: I9f629d9f4446d12bfb492e00e49e07b97ef5a490 Signed-off-by: liamfallon --- .../src/test/java/org/onap/policy/models/dao/EntityTest.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'models-dao/src') diff --git a/models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java b/models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java index 863eda146..74d06369a 100644 --- a/models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java +++ b/models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java @@ -33,6 +33,7 @@ import java.util.Set; import java.util.TreeSet; import java.util.UUID; +import org.eclipse.persistence.config.PersistenceUnitProperties; import org.junit.Test; import org.onap.policy.models.base.PfConceptKey; import org.onap.policy.models.base.PfModelException; @@ -53,10 +54,12 @@ public class EntityTest { final DaoParameters daoParameters = new DaoParameters(); Properties jdbcProperties = new Properties(); - jdbcProperties.setProperty("javax.persistence.jdbc.driver", "org.h2.Driver"); - jdbcProperties.setProperty("javax.persistence.jdbc.url", "jdbc:h2:mem:testdb"); - jdbcProperties.setProperty("javax.persistence.jdbc.user", "sa"); - jdbcProperties.setProperty("javax.persistence.jdbc.password", ""); + // @formatter:off + jdbcProperties.setProperty(PersistenceUnitProperties.JDBC_DRIVER, "org.h2.Driver"); + jdbcProperties.setProperty(PersistenceUnitProperties.JDBC_URL, "jdbc:h2:mem:testdb"); + jdbcProperties.setProperty(PersistenceUnitProperties.JDBC_USER, "sa"); + jdbcProperties.setProperty(PersistenceUnitProperties.JDBC_PASSWORD, ""); + // @formatter:on daoParameters.setJdbcProperties(jdbcProperties); -- cgit 1.2.3-korg