diff options
author | Steven Blimkie <Steven.Blimkie@amdocs.com> | 2018-11-30 14:49:13 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-11-30 14:49:13 +0000 |
commit | 4d27f8557d5d59c8be5a342f0e16a18ef400cae5 (patch) | |
tree | 8a3241117b3850fc900457610bcacab724ba85b7 /sparkybe-onap-service/src/test | |
parent | 64799959d265ad14c44b0d1d07a50bfa7d7d3e6d (diff) | |
parent | c77d4200369b9514d9731cbdcaa987943a36346d (diff) |
Merge "update to use latest portal sdk"
Diffstat (limited to 'sparkybe-onap-service/src/test')
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; |