From 9bf9bff9083fed4f6c996f9deb8dcfd0143bd67d Mon Sep 17 00:00:00 2001 From: bobbymander Date: Fri, 23 Mar 2018 14:31:13 -0400 Subject: JUnit additions for PAP-REST,REST Issue-ID: POLICY-603 Change-Id: Id7d2c1a835d028e88337db67d55f139aa1764826 Signed-off-by: bobbymander --- .../src/test/java/org/onap/policy/conf/HibernateSessionTest.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'POLICY-SDK-APP') 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()); -- cgit 1.2.3-korg