summaryrefslogtreecommitdiffstats
path: root/POLICY-SDK-APP
diff options
context:
space:
mode:
authorbobbymander <bobby.mander@att.com>2018-03-23 14:31:13 -0400
committerbobbymander <bobby.mander@att.com>2018-03-23 14:34:51 -0400
commit9bf9bff9083fed4f6c996f9deb8dcfd0143bd67d (patch)
tree37d4844b2f05bc7771c6e0d11157cf33b372453f /POLICY-SDK-APP
parent7a14106f07b1de10d9627ba4baa25587043be6e3 (diff)
JUnit additions for PAP-REST,REST
Issue-ID: POLICY-603 Change-Id: Id7d2c1a835d028e88337db67d55f139aa1764826 Signed-off-by: bobbymander <bobby.mander@att.com>
Diffstat (limited to 'POLICY-SDK-APP')
-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());
href='#n212'>212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275