summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-common/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-sdk/epsdk-app-common/src/test/java')
-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);