aboutsummaryrefslogtreecommitdiffstats
path: root/models-dao/src
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2019-04-12 12:44:22 +0000
committerliamfallon <liam.fallon@est.tech>2019-04-12 12:44:22 +0000
commit8a26f57269caf7a559deb46077050048da92dca8 (patch)
tree160dcaa0ffb7916aea2a657a2319ded94ac82a17 /models-dao/src
parentad2f809ab6e723a79d633aacc2239b17e010e843 (diff)
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 <liam.fallon@est.tech>
Diffstat (limited to 'models-dao/src')
-rw-r--r--models-dao/src/test/java/org/onap/policy/models/dao/EntityTest.java11
1 files changed, 7 insertions, 4 deletions
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);