summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-common/src/test/java
diff options
context:
space:
mode:
authorDominik Mizyn <d.mizyn@samsung.com>2019-06-18 11:14:38 +0200
committerDominik Mizyn <d.mizyn@samsung.com>2019-06-18 11:14:42 +0200
commit44be7f841e451097d29bd9313d9558e3f9031d1b (patch)
tree2eec0a9bae48f700dd13ae110b5ebb198e0a74cc /ecomp-portal-BE-common/src/test/java
parent78d887081e8a637ae116948029f37c0760392b7e (diff)
FunctionalMenuRole class DB constraints
Java Bean Validation SR 380 annotations added to classes Getter, Setter, hashCode, equals changed to lombok annotation Issue-ID: PORTAL-642 Change-Id: I666b0245add8e97f490d991701f548c0cd128cb6 Signed-off-by: Dominik Mizyn <d.mizyn@samsung.com>
Diffstat (limited to 'ecomp-portal-BE-common/src/test/java')
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/FunctionalMenuRoleTest.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/FunctionalMenuRoleTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/FunctionalMenuRoleTest.java
index 3000c2f4..44047322 100644
--- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/FunctionalMenuRoleTest.java
+++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/transport/FunctionalMenuRoleTest.java
@@ -37,41 +37,41 @@
*/
package org.onap.portalapp.portal.transport;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
import org.junit.Test;
-import org.onap.portalapp.portal.transport.FunctionalMenuRole;
public class FunctionalMenuRoleTest {
public FunctionalMenuRole mockFunctionalMenuRole(){
FunctionalMenuRole functionalMenuRole = new FunctionalMenuRole();
-
+
functionalMenuRole.setId(1);
functionalMenuRole.setMenuId((long)1);
functionalMenuRole.setAppId(1);
functionalMenuRole.setRoleId(1);
-
+
return functionalMenuRole;
}
-
+
@Test
public void functionalMenuRoleTest(){
FunctionalMenuRole functionalMenuRole = mockFunctionalMenuRole();
-
+
FunctionalMenuRole functionalMenuRole1 = new FunctionalMenuRole();
functionalMenuRole1.setId(1);
functionalMenuRole1.setMenuId((long)1);
functionalMenuRole1.setAppId(1);
functionalMenuRole1.setRoleId(1);
-
+
assertEquals(functionalMenuRole.getId().toString(), "1");
assertEquals(functionalMenuRole.getMenuId(), new Long(1));
assertEquals(functionalMenuRole.getAppId().toString(), "1");
assertEquals(functionalMenuRole.getRoleId().toString(), "1");
- assertEquals(functionalMenuRole.toString(), "FunctionalMenuRole [id=1, menuId=1, appId=1, roleId=1]");
+ assertEquals(functionalMenuRole.toString(), "FunctionalMenuRole(id=1, menuId=1, appId=1, roleId=1)");
assertTrue(functionalMenuRole.equals(functionalMenuRole1));
assertEquals(functionalMenuRole.hashCode(), functionalMenuRole1.hashCode());
-
+
}
}