1 package org.openecomp.portalapp.portal.transport;
3 import static org.junit.Assert.*;
6 import org.openecomp.portalapp.portal.transport.EpNotificationItem;
8 public class EpNotificationItemTest {
10 public EpNotificationItem mockEpNotificationItem(){
11 EpNotificationItem epNotificationItem = new EpNotificationItem();
13 epNotificationItem.setNotificationId((long)1);
14 epNotificationItem.setIsForOnlineUsers("test");
15 epNotificationItem.setIsForAllRoles("test");
16 epNotificationItem.setActiveYn("test");
17 epNotificationItem.setMsgHeader("test");
18 epNotificationItem.setMsgDescription("test");
19 epNotificationItem.setMsgSource("test");
21 epNotificationItem.setPriority((long)1);
22 epNotificationItem.setCreatedId((long)1);
23 epNotificationItem.setNotificationHyperlink("test");
25 return epNotificationItem;
29 public void epNotificationItemTest(){
30 EpNotificationItem epNotificationItem = mockEpNotificationItem();
32 EpNotificationItem epNotificationItem1 = new EpNotificationItem();
33 epNotificationItem1.setNotificationId((long)1);
34 epNotificationItem1.setIsForOnlineUsers("test");
35 epNotificationItem1.setIsForAllRoles("test");
36 epNotificationItem1.setActiveYn("test");
37 epNotificationItem1.setMsgHeader("test");
38 epNotificationItem1.setMsgDescription("test");
39 epNotificationItem1.setMsgSource("test");
41 epNotificationItem1.setPriority((long)1);
42 epNotificationItem1.setCreatedId((long)1);
43 epNotificationItem1.setNotificationHyperlink("test");
45 assertEquals(epNotificationItem.getNotificationId(), new Long(1));
46 assertEquals(epNotificationItem.getIsForOnlineUsers(), "test");
47 assertEquals(epNotificationItem.getIsForAllRoles(), "test");
48 assertEquals(epNotificationItem.getActiveYn(), "test");
49 assertEquals(epNotificationItem.getMsgHeader(), "test");
50 assertEquals(epNotificationItem.getMsgDescription(), "test");
51 assertEquals(epNotificationItem.getMsgSource(), "test");
52 assertEquals(epNotificationItem.getPriority(), new Long(1));
53 assertEquals(epNotificationItem.getCreatedId(), new Long(1));
54 assertEquals(epNotificationItem.getNotificationHyperlink(), "test");
56 assertEquals(epNotificationItem.toString(), "EpNotificationItem [notificationId=1, isForOnlineUsers=test, isForAllRoles=test, activeYn=test, msgHeader=test, msgDescription=test, msgSource=test, startTime=null, endTime=null, priority=1, creatorId=null, createdDate=null, roles=null, roleIds=null]");
57 assertEquals(epNotificationItem.hashCode(), epNotificationItem1.hashCode());
58 assertTrue(epNotificationItem.equals(epNotificationItem1));