summaryrefslogtreecommitdiffstats
path: root/POLICY-SDK-APP/src
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2018-03-25 00:00:19 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-25 00:00:19 +0000
commitef59cda51b8320446dc235288340b711367c6c2e (patch)
tree40ca845934487c9c29b93110a20bb640cd8a3108 /POLICY-SDK-APP/src
parentee55aecddbf05c0efa235e9673fb402fce213180 (diff)
parent9bf9bff9083fed4f6c996f9deb8dcfd0143bd67d (diff)
Merge "JUnit additions for PAP-REST,REST"
Diffstat (limited to 'POLICY-SDK-APP/src')
-rw-r--r--POLICY-SDK-APP/src/test/java/org/onap/policy/conf/HibernateSessionTest.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/POLICY-SDK-APP/src/test/java/org/onap/policy/conf/HibernateSessionTest.java b/POLICY-SDK-APP/src/test/java/org/onap/policy/conf/HibernateSessionTest.java
index e590fb3e9..f211c6df0 100644
--- a/POLICY-SDK-APP/src/test/java/org/onap/policy/conf/HibernateSessionTest.java
+++ b/POLICY-SDK-APP/src/test/java/org/onap/policy/conf/HibernateSessionTest.java
@@ -22,18 +22,23 @@ package org.onap.policy.conf;
import static org.junit.Assert.assertNull;
import org.hibernate.SessionFactory;
+import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import org.onap.policy.controller.PolicyController;
public class HibernateSessionTest {
- @Test
- public void testSession() {
+ @Before
+ public void setup() {
PolicyController.setLogdbUrl("testURL");
PolicyController.setLogdbUserName("testUser");
PolicyController.setLogdbPassword("testPass");
PolicyController.setLogdbDialect("testDialect");
PolicyController.setLogdbDriver("testDriver");
+ }
+
+ @Test
+ public void testSession() {
SessionFactory factory = Mockito.mock(SessionFactory.class);
HibernateSession.setSession(factory);
assertNull(HibernateSession.getSession());