diff options
Diffstat (limited to 'ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EPUserAppCurrentRolesTest.java')
-rw-r--r-- | ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EPUserAppCurrentRolesTest.java | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EPUserAppCurrentRolesTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EPUserAppCurrentRolesTest.java new file mode 100644 index 00000000..9c82ad37 --- /dev/null +++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EPUserAppCurrentRolesTest.java @@ -0,0 +1,41 @@ +package org.openecomp.portalapp.portal.transport; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; +import org.openecomp.portalapp.portal.transport.EPUserAppCurrentRoles; + +public class EPUserAppCurrentRolesTest { + + public EPUserAppCurrentRoles mockEPUserAppCurrentRoles(){ + EPUserAppCurrentRoles epUserAppCurrentRoles = new EPUserAppCurrentRoles(); + + epUserAppCurrentRoles.setRoleName("test"); + epUserAppCurrentRoles.setUserId((long)1); + epUserAppCurrentRoles.setPriority("test"); + epUserAppCurrentRoles.setRoleId((long)1); + + return epUserAppCurrentRoles; + } + + @Test + public void epUserAppCurrentRolesTest(){ + EPUserAppCurrentRoles epUserAppCurrentRoles = mockEPUserAppCurrentRoles(); + + EPUserAppCurrentRoles epUserAppCurrentRoles1 = new EPUserAppCurrentRoles(); + + epUserAppCurrentRoles1.setRoleName("test"); + epUserAppCurrentRoles1.setUserId((long)1); + epUserAppCurrentRoles1.setPriority("test"); + epUserAppCurrentRoles1.setRoleId((long)1); + + assertEquals(epUserAppCurrentRoles.getRoleName(), "test"); + assertEquals(epUserAppCurrentRoles.getUserId(), new Long(1)); + assertEquals(epUserAppCurrentRoles.getRoleId(), new Long(1)); + assertEquals(epUserAppCurrentRoles.getPriority(), "test"); + assertEquals(epUserAppCurrentRoles.hashCode(), epUserAppCurrentRoles1.hashCode()); + assertTrue(epUserAppCurrentRoles.equals(epUserAppCurrentRoles1)); + + } +} |