summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-common/src/test
diff options
context:
space:
mode:
authorKotta, Shireesha (sk434m) <shireesha.kotta@att.com>2018-10-09 11:28:41 -0400
committerKotta, Shireesha (sk434m) <shireesha.kotta@att.com>2018-10-09 16:55:17 -0400
commit47bcf09a62fb260a60b90d4f6c8406d956ab5a8a (patch)
treed1eb28e038f362bc4a68207c6f6a74535e47f782 /ecomp-portal-BE-common/src/test
parent15586620ec762ba42f2c6ec1b596ea6ea4425355 (diff)
Add roles to user
Issue-ID: PORTAL-432 add roles to user when the app is centralized Change-Id: I46a782be24ea1804597dc7205bf98170731ffe4d Signed-off-by: Kotta, Shireesha (sk434m) <shireesha.kotta@att.com>
Diffstat (limited to 'ecomp-portal-BE-common/src/test')
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalAccessUserRoleDetailTest.java13
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalRoleDescriptionTest.java35
2 files changed, 2 insertions, 46 deletions
diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalAccessUserRoleDetailTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalAccessUserRoleDetailTest.java
index e6d97ec4..1ddadd89 100644
--- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalAccessUserRoleDetailTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalAccessUserRoleDetailTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
@@ -48,13 +48,7 @@ public class ExternalAccessUserRoleDetailTest {
public ExternalAccessUserRoleDetail mockExternalAccessUserRoleDetail(){
ExternalRoleDescription externalRoleDescription = new ExternalRoleDescription();
- externalRoleDescription.setId("test");
externalRoleDescription.setName("test");
- externalRoleDescription.setActive("test");
- externalRoleDescription.setPriority("test");
- externalRoleDescription.setAppId("test");
- externalRoleDescription.setAppRoleId("test");
-
ExternalAccessUserRoleDetail externalAccessUserRoleDetail = new ExternalAccessUserRoleDetail("test", externalRoleDescription);
externalAccessUserRoleDetail.setName("test");
@@ -67,12 +61,7 @@ public class ExternalAccessUserRoleDetailTest {
ExternalAccessUserRoleDetail externalAccessUserRoleDetail = mockExternalAccessUserRoleDetail();
ExternalRoleDescription externalRoleDescription1 = new ExternalRoleDescription();
- externalRoleDescription1.setId("test");
externalRoleDescription1.setName("test");
- externalRoleDescription1.setActive("test");
- externalRoleDescription1.setPriority("test");
- externalRoleDescription1.setAppId("test");
- externalRoleDescription1.setAppRoleId("test");
ExternalAccessUserRoleDetail externalAccessUserRoleDetail1 = new ExternalAccessUserRoleDetail("test", externalRoleDescription1);
diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalRoleDescriptionTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalRoleDescriptionTest.java
index 6a4b6cab..41ee7fde 100644
--- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalRoleDescriptionTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/ExternalRoleDescriptionTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START==========================================
* ONAP Portal
* ===================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
* ===================================================================
*
* Unless otherwise specified, all software contained herein is licensed
@@ -42,7 +42,6 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
-import org.onap.portalapp.portal.transport.ExternalRoleDescription;
public class ExternalRoleDescriptionTest {
@@ -51,49 +50,17 @@ public class ExternalRoleDescriptionTest {
@Test
public void externalRoleDescriptionTest(){
ExternalRoleDescription extRole=mockExternalRoleDescription();
-
ExternalRoleDescription externalRoleDescription = new ExternalRoleDescription();
- externalRoleDescription.setId(extRole.getId());
externalRoleDescription.setName(extRole.getName());
- externalRoleDescription.setActive(extRole.getActive());
- externalRoleDescription.setPriority(extRole.getPriority());
- externalRoleDescription.setAppId(extRole.getAppId());
- externalRoleDescription.setAppRoleId(extRole.getAppRoleId());
-
- assertEquals(externalRoleDescription.getId(), TEST);
assertEquals(externalRoleDescription.getName(), TEST);
- assertEquals(externalRoleDescription.getActive(), TEST);
- assertEquals(externalRoleDescription.getPriority(), TEST);
- assertEquals(externalRoleDescription.getAppId(), TEST);
- assertEquals(externalRoleDescription.getAppRoleId(), TEST);
assertEquals(externalRoleDescription.hashCode(), extRole.hashCode());
assertTrue(externalRoleDescription.equals(extRole));
-
- assertFalse(externalRoleDescription.equals(null));
- externalRoleDescription.setPriority(null);
- assertFalse(externalRoleDescription.equals(extRole));
externalRoleDescription.setName(null);
assertFalse(externalRoleDescription.equals(extRole));
- externalRoleDescription.setId(null);
- assertFalse(externalRoleDescription.equals(extRole));
- externalRoleDescription.setAppRoleId(null);
- assertFalse(externalRoleDescription.equals(extRole));
- externalRoleDescription.setAppId(null);
- assertFalse(externalRoleDescription.equals(extRole));
- externalRoleDescription.setActive(null);
- assertFalse(externalRoleDescription.equals(extRole));
}
private ExternalRoleDescription mockExternalRoleDescription(){
-
ExternalRoleDescription externalRoleDescription = new ExternalRoleDescription();
-
- externalRoleDescription.setId(TEST);
externalRoleDescription.setName(TEST);
- externalRoleDescription.setActive(TEST);
- externalRoleDescription.setPriority(TEST);
- externalRoleDescription.setAppId(TEST);
- externalRoleDescription.setAppRoleId(TEST);
-
return externalRoleDescription;
}