aboutsummaryrefslogtreecommitdiffstats
path: root/POLICY-SDK-APP/src/test/java/org/onap
diff options
context:
space:
mode:
authorrb7147 <rb7147@att.com>2017-12-04 16:45:55 -0500
committerrb7147 <rb7147@att.com>2017-12-08 10:45:57 -0500
commit428150834ee60899b9a8da019bae3c8bf009adf1 (patch)
tree7197eb324477cad918cf527c7a479302cb5029f7 /POLICY-SDK-APP/src/test/java/org/onap
parent775f45908025e46a40c9c147fca2066af5c8c5b8 (diff)
Upgraded the latest ONAP SDK
Upgraded latest ONAP SDK Code. Change-Id: I669d6cfcefe068b1e4c078889d7d6c77ce788e2e Issue-ID: POLICY-432 Signed-off-by: rb7147 <rb7147@att.com>
Diffstat (limited to 'POLICY-SDK-APP/src/test/java/org/onap')
-rw-r--r--POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyManagerServletTest.java2
-rw-r--r--POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyRestControllerTest.java4
-rw-r--r--POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyUserInfoControllerTest.java4
-rw-r--r--POLICY-SDK-APP/src/test/java/org/onap/policy/controller/AdminTabControllerTest.java13
-rw-r--r--POLICY-SDK-APP/src/test/java/org/onap/policy/controller/PDPControllerTest.java2
5 files changed, 18 insertions, 7 deletions
diff --git a/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyManagerServletTest.java b/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyManagerServletTest.java
index 22cc82a23..dc2159bc1 100644
--- a/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyManagerServletTest.java
+++ b/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyManagerServletTest.java
@@ -40,6 +40,7 @@ import org.onap.policy.common.logging.flexlogger.FlexLogger;
import org.onap.policy.common.logging.flexlogger.Logger;
import org.onap.policy.controller.CreateDcaeMicroServiceController;
import org.onap.policy.controller.PolicyController;
+import org.onap.policy.model.Roles;
import org.onap.policy.rest.dao.CommonClassDao;
import org.onap.policy.rest.jpa.ActionBodyEntity;
import org.onap.policy.rest.jpa.ConfigurationDataEntity;
@@ -48,7 +49,6 @@ import org.onap.policy.rest.jpa.PolicyEditorScopes;
import org.onap.policy.rest.jpa.PolicyEntity;
import org.onap.policy.rest.jpa.PolicyVersion;
import org.onap.policy.rest.jpa.UserInfo;
-import org.openecomp.policy.model.Roles;
public class PolicyManagerServletTest extends Mockito{
diff --git a/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyRestControllerTest.java b/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyRestControllerTest.java
index 1bda7cd41..16cefd854 100644
--- a/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyRestControllerTest.java
+++ b/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyRestControllerTest.java
@@ -45,8 +45,8 @@ import org.onap.policy.rest.jpa.PrefixList;
import org.onap.policy.rest.jpa.SecurityZone;
import org.onap.policy.rest.jpa.ServiceList;
import org.onap.policy.rest.jpa.TermList;
-import org.openecomp.portalsdk.core.domain.User;
-import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.onap.portalsdk.core.domain.User;
+import org.onap.portalsdk.core.util.SystemProperties;
import org.springframework.mock.web.MockHttpServletResponse;
public class PolicyRestControllerTest {
diff --git a/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyUserInfoControllerTest.java b/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyUserInfoControllerTest.java
index f4acaeb9a..7a3401568 100644
--- a/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyUserInfoControllerTest.java
+++ b/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyUserInfoControllerTest.java
@@ -29,8 +29,8 @@ import javax.servlet.http.HttpSession;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
-import org.openecomp.portalsdk.core.domain.User;
-import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.onap.portalsdk.core.domain.User;
+import org.onap.portalsdk.core.util.SystemProperties;
import org.springframework.mock.web.MockHttpServletResponse;
public class PolicyUserInfoControllerTest {
diff --git a/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/AdminTabControllerTest.java b/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/AdminTabControllerTest.java
index 0109cb503..17ad56457 100644
--- a/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/AdminTabControllerTest.java
+++ b/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/AdminTabControllerTest.java
@@ -19,7 +19,8 @@
*/
package org.onap.policy.controller;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -30,13 +31,17 @@ import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
import org.junit.Before;
import org.junit.Test;
+import org.mockito.Mockito;
import org.onap.policy.common.logging.flexlogger.FlexLogger;
import org.onap.policy.common.logging.flexlogger.Logger;
import org.onap.policy.rest.dao.CommonClassDao;
import org.onap.policy.rest.jpa.GlobalRoleSettings;
+import org.onap.portalsdk.core.domain.User;
+import org.onap.portalsdk.core.util.SystemProperties;
import org.springframework.mock.web.MockHttpServletResponse;
public class AdminTabControllerTest {
@@ -55,6 +60,12 @@ public class AdminTabControllerTest {
request = mock(HttpServletRequest.class);
response = new MockHttpServletResponse();
+ HttpSession mockSession = mock(HttpSession.class);
+ User user = new User();
+ user.setOrgUserId("Test");
+ Mockito.when(mockSession.getAttribute(SystemProperties.getProperty("user_attribute_name"))).thenReturn(user);
+ Mockito.when(request.getSession(false)).thenReturn(mockSession);
+
AdminTabController.setCommonClassDao(commonClassDao);
GlobalRoleSettings globalRole = new GlobalRoleSettings();
diff --git a/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/PDPControllerTest.java b/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/PDPControllerTest.java
index 8433c4740..55a2288c7 100644
--- a/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/PDPControllerTest.java
+++ b/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/PDPControllerTest.java
@@ -34,10 +34,10 @@ import org.junit.Test;
import org.mockito.Mockito;
import org.onap.policy.common.logging.flexlogger.FlexLogger;
import org.onap.policy.common.logging.flexlogger.Logger;
+import org.onap.policy.model.Roles;
import org.onap.policy.xacml.api.pap.OnapPDPGroup;
import org.onap.policy.xacml.std.pap.StdPDPGroup;
import org.onap.policy.xacml.std.pap.StdPDPGroupStatus;
-import org.openecomp.policy.model.Roles;
import org.springframework.mock.web.MockHttpServletResponse;