summaryrefslogtreecommitdiffstats
path: root/sparkybe-onap-service/src/test
diff options
context:
space:
mode:
authorrenealr <reneal.rogers@amdocs.com>2018-11-29 14:03:36 -0500
committerrenealr <reneal.rogers@amdocs.com>2018-11-29 15:53:48 -0500
commitc77d4200369b9514d9731cbdcaa987943a36346d (patch)
tree94f0d1c262752f1d771dd0ec07f7ce07694def2f /sparkybe-onap-service/src/test
parent5e4b48acc875f88e2958b4469cb889222ca2f11c (diff)
update to use latest portal sdk
update epsdk-fw to latest version to make use of aaf Issue-ID: AAI-1978 Change-Id: I9cd9a4ec57db5183c95b0606cac0e1fdfd1a6ac5 Signed-off-by: renealr <reneal.rogers@amdocs.com>
Diffstat (limited to 'sparkybe-onap-service/src/test')
-rw-r--r--sparkybe-onap-service/src/test/java/org/onap/aai/sparky/security/portal/PortalRestAPICentralServiceImplTest.java40
-rw-r--r--sparkybe-onap-service/src/test/java/org/onap/aai/sparky/security/portal/TestUserManager.java4
2 files changed, 41 insertions, 3 deletions
diff --git a/sparkybe-onap-service/src/test/java/org/onap/aai/sparky/security/portal/PortalRestAPICentralServiceImplTest.java b/sparkybe-onap-service/src/test/java/org/onap/aai/sparky/security/portal/PortalRestAPICentralServiceImplTest.java
new file mode 100644
index 0000000..fe6175d
--- /dev/null
+++ b/sparkybe-onap-service/src/test/java/org/onap/aai/sparky/security/portal/PortalRestAPICentralServiceImplTest.java
@@ -0,0 +1,40 @@
+package org.onap.aai.sparky.security.portal;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.portalsdk.core.onboarding.exception.PortalAPIException;
+import org.onap.portalsdk.core.restful.domain.EcompUser;
+
+public class PortalRestAPICentralServiceImplTest {
+
+ private PortalRestAPICentralServiceImpl portalRestAPICentralImpl;
+ private static final String LOGINID_1 = "200";
+ private HttpServletRequest request;
+ private EcompUser ecompUser;
+
+ @Before
+ public void init() throws Exception {
+ request = Mockito.mock(HttpServletRequest.class);
+ portalRestAPICentralImpl = new PortalRestAPICentralServiceImpl();
+ ecompUser = new EcompUser();
+ }
+
+
+ @Test
+ public void testIsAppAuthenticated() throws PortalAPIException {
+ portalRestAPICentralImpl.isAppAuthenticated(request);
+ }
+
+ @Test
+ public void testgetCredentials() throws PortalAPIException {
+ portalRestAPICentralImpl.editUser(LOGINID_1, ecompUser);
+ portalRestAPICentralImpl.getCredentials();
+ portalRestAPICentralImpl.getAppCredentials();
+
+ }
+
+
+}
diff --git a/sparkybe-onap-service/src/test/java/org/onap/aai/sparky/security/portal/TestUserManager.java b/sparkybe-onap-service/src/test/java/org/onap/aai/sparky/security/portal/TestUserManager.java
index 784d807..9249a21 100644
--- a/sparkybe-onap-service/src/test/java/org/onap/aai/sparky/security/portal/TestUserManager.java
+++ b/sparkybe-onap-service/src/test/java/org/onap/aai/sparky/security/portal/TestUserManager.java
@@ -45,11 +45,9 @@ import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
-import org.junit.runner.RunWith;
import org.onap.aai.sparky.security.portal.UserManager;
import org.onap.aai.sparky.util.NodeUtils;
-import org.openecomp.portalsdk.core.restful.domain.EcompUser;
-import org.powermock.modules.junit4.PowerMockRunner;
+import org.onap.portalsdk.core.restful.domain.EcompUser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;