From ecfe375994b7561d37a07f8879740b1c85f260a2 Mon Sep 17 00:00:00 2001 From: "Kishore Reddy, Gujja (kg811t)" Date: Wed, 15 Aug 2018 08:39:30 -0400 Subject: Modified User Auth and permission aaf services Issue-ID: PORTAL-334 Change-Id: I461fd5a61879434e9c105c7598e9948004a5f608 Signed-off-by: Kishore Reddy, Gujja (kg811t) --- .../portalapp/service/OnBoardingApiServiceImplTest.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'ecomp-sdk/epsdk-app-common/src/test/java/org/onap') 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 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 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); -- cgit 1.2.3-korg