diff options
author | Kishore Reddy, Gujja (kg811t) <kg811t@research.att.com> | 2018-08-15 08:39:30 -0400 |
---|---|---|
committer | Kishore Reddy, Gujja (kg811t) <kg811t@research.att.com> | 2018-08-15 11:21:38 -0400 |
commit | ecfe375994b7561d37a07f8879740b1c85f260a2 (patch) | |
tree | 2876499d2adeecea4af8641662722a3a3627338d /ecomp-sdk/epsdk-domain/src/test | |
parent | 2e2ec498ce80d674c08ef8909adb5e1138b710bd (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-domain/src/test')
-rw-r--r-- | ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/UserAppTest.java | 4 | ||||
-rw-r--r-- | ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/UserTest.java | 20 |
2 files changed, 16 insertions, 8 deletions
diff --git a/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/UserAppTest.java b/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/UserAppTest.java index 2433d93b..288b5a21 100644 --- a/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/UserAppTest.java +++ b/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/UserAppTest.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 @@ -66,7 +66,7 @@ public class UserAppTest { UserApp userapp2 = mockUserApp(); userapp2.setUserId((long) 2); assertNull(userapp1.getPriority()); - assertEquals(userapp2.compareTo(userapp1), 1); + assertEquals(userapp2.compareTo(userapp1), 50653); assertNotNull(userapp1.hashCode()); userapp2.setUserId((long) 1); assertTrue(userapp1.equals(userapp2)); diff --git a/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/UserTest.java b/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/UserTest.java index 598ee900..b4fb2ced 100644 --- a/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/UserTest.java +++ b/ecomp-sdk/epsdk-domain/src/test/java/org/onap/portalsdk/core/domain/UserTest.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 @@ -37,17 +37,15 @@ */ package org.onap.portalsdk.core.domain; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; import org.junit.Test; -import org.onap.portalsdk.core.domain.App; -import org.onap.portalsdk.core.domain.Role; -import org.onap.portalsdk.core.domain.User; -import org.onap.portalsdk.core.domain.UserApp; public class UserTest { @@ -165,8 +163,14 @@ public class UserTest { public void addAppRolesIfRolesNullTest() { User user = mockUser(); + App appTest = new App(); + appTest.setId(1l); + SortedSet<Role> roles = new TreeSet<>(); Set userApps = new TreeSet(); UserApp userapp = new UserApp(); + userapp.setApp(appTest); + userapp.setRole(new Role()); + user.setRoles(roles); userApps.add(userapp); user.setUserApps(userApps); user.setUserApps(userApps); @@ -195,11 +199,15 @@ public class UserTest { User user = mockUser(); Set userApps = new TreeSet(); UserApp userapp = new UserApp(); + App app = new App(); + app.setId(1l); SortedSet<Role> roles = new TreeSet(); Role role = new Role(); role.setId((long) 1); + role.setName("test"); roles.add(role); userapp.setRole(role); + userapp.setApp(app); userApps.add(userapp); user.setUserApps(userApps); user.removeRole((long) 1); |