summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-common/src/test
diff options
context:
space:
mode:
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;
}