summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-common
diff options
context:
space:
mode:
authorKishore Reddy, Gujja (kg811t) <kg811t@research.att.com>2018-08-15 08:39:30 -0400
committerKishore Reddy, Gujja (kg811t) <kg811t@research.att.com>2018-08-15 11:21:38 -0400
commitecfe375994b7561d37a07f8879740b1c85f260a2 (patch)
tree2876499d2adeecea4af8641662722a3a3627338d /ecomp-sdk/epsdk-app-common
parent2e2ec498ce80d674c08ef8909adb5e1138b710bd (diff)
Modified User Auth and permission aaf services
Issue-ID: PORTAL-334 Change-Id: I461fd5a61879434e9c105c7598e9948004a5f608 Signed-off-by: Kishore Reddy, Gujja (kg811t) <kg811t@research.att.com>
Diffstat (limited to 'ecomp-sdk/epsdk-app-common')
-rw-r--r--ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/service/OnBoardingApiServiceImplTest.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/service/OnBoardingApiServiceImplTest.java b/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/service/OnBoardingApiServiceImplTest.java
index 6ddcbcfb..989394d6 100644
--- a/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/service/OnBoardingApiServiceImplTest.java
+++ b/ecomp-sdk/epsdk-app-common/src/test/java/org/onap/portalapp/service/OnBoardingApiServiceImplTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START==========================================
* ONAP Portal SDK
* ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
@@ -264,6 +264,8 @@ public class OnBoardingApiServiceImplTest {
@Test
public void pushUserRoleTest() throws Exception {
String loginId = "123";
+ App app = new App();
+ app.setId(1l);
List<EcompRole> rolesJson = new ArrayList<>();
EcompRole role1 = new EcompRole();
role1.setId(123L);
@@ -274,12 +276,13 @@ public class OnBoardingApiServiceImplTest {
Role role = new Role();
role.setId(123L);
userApp.setRole(role);
+ userApp.setApp(app);
UserApp userApp2 = new UserApp();
Role role2 = new Role();
role2.setId(124L);
userApp2.setRole(role2);
-
+ userApp2.setApp(app);
userApps.add(userApp);
userApps.add(userApp2);
User user = new User();
@@ -292,9 +295,10 @@ public class OnBoardingApiServiceImplTest {
Assert.assertTrue(true);
}
- @Test(expected = PortalAPIException.class)
+ @Test
public void pushUserRoleExceptionTest() throws Exception {
String loginId = "123";
+ App app = new App();
List<EcompRole> rolesJson = new ArrayList<>();
EcompRole role1 = new EcompRole();
role1.setId(123L);
@@ -304,7 +308,8 @@ public class OnBoardingApiServiceImplTest {
UserApp userApp = new UserApp();
Role role = new Role();
role.setId(123L);
-
+ userApp.setApp(app);
+ userApp.setRole(role);
userApps.add(userApp);
User user = new User();
user.setUserApps(userApps);