JUnits for coverage
[portal.git] / ecomp-portal-BE-common / src / test / java / org / onap / portalapp / portal / transport / EpNotificationItemVOTest.java
1 /*-
2  * ============LICENSE_START==========================================
3  * ONAP Portal
4  * ===================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ===================================================================
7  *
8  * Unless otherwise specified, all software contained herein is licensed
9  * under the Apache License, Version 2.0 (the "License");
10  * you may not use this software except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *             http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  * Unless otherwise specified, all documentation contained herein is licensed
22  * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
23  * you may not use this documentation except in compliance with the License.
24  * You may obtain a copy of the License at
25  *
26  *             https://creativecommons.org/licenses/by/4.0/
27  *
28  * Unless required by applicable law or agreed to in writing, documentation
29  * distributed under the License is distributed on an "AS IS" BASIS,
30  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31  * See the License for the specific language governing permissions and
32  * limitations under the License.
33  *
34  * ============LICENSE_END============================================
35  *
36  * 
37  */
38 package org.onap.portalapp.portal.transport;
39
40 import static org.junit.Assert.assertTrue;
41
42 import java.util.Date;
43
44 import org.junit.Test;
45
46 public class EpNotificationItemVOTest {
47         
48         private static final String TEST="test";
49         private static final Integer ID=1;
50         private static final Long EP_ID=1l;
51         private static final Date  DATE=new Date();
52         private static final Character CHARACTER='a';
53
54         public EpNotificationItemVO mockEpNotificationItemVO(){
55                 EpNotificationItemVO epNotificationItemVO = new EpNotificationItemVO();
56                                 
57                 epNotificationItemVO.setNotificationId(ID);
58                 epNotificationItemVO.setIsForOnlineUsers(CHARACTER);
59                 epNotificationItemVO.setIsForAllRoles(CHARACTER);
60                 epNotificationItemVO.setActiveYn(CHARACTER);
61                 epNotificationItemVO.setMsgHeader(TEST);
62                 epNotificationItemVO.setMsgDescription(TEST);
63                 epNotificationItemVO.setMsgSource(TEST);
64                 epNotificationItemVO.setStartTime(DATE);
65                 epNotificationItemVO.setEndTime(DATE);
66                 epNotificationItemVO.setPriority(1);
67                 epNotificationItemVO.setCreatorId(1);
68                 epNotificationItemVO.setCreatedDate(DATE);
69                 epNotificationItemVO.setLoginId(TEST);
70                 epNotificationItemVO.setNotificationHyperlink(TEST);
71                 epNotificationItemVO.setId(EP_ID);
72                 epNotificationItemVO.setCreated(DATE);
73                 epNotificationItemVO.setModified(DATE);
74                 epNotificationItemVO.setCreatedId(EP_ID);
75                 epNotificationItemVO.setModifiedId(EP_ID);
76                 epNotificationItemVO.setRowNum(EP_ID);
77                 
78                 epNotificationItemVO.setAuditUserId(EP_ID);
79                 epNotificationItemVO.setAuditTrail(null);
80                         
81                 
82                  return epNotificationItemVO;
83         }
84         
85         @Test
86         public void epNotificationItemVOTest(){
87                 EpNotificationItemVO epNotification = mockEpNotificationItemVO();
88                 
89                 EpNotificationItemVO epNotificationItemVO =new EpNotificationItemVO();
90                 
91                 epNotificationItemVO.setNotificationId(epNotification.getNotificationId());
92                 epNotificationItemVO.setIsForOnlineUsers(epNotification.getIsForOnlineUsers());
93                 epNotificationItemVO.setIsForAllRoles(epNotification.getIsForAllRoles());
94                 epNotificationItemVO.setActiveYn(epNotification.getActiveYn());
95                 epNotificationItemVO.setMsgHeader(epNotification.getMsgHeader());
96                 epNotificationItemVO.setMsgDescription(epNotification.getMsgDescription());
97                 epNotificationItemVO.setMsgSource(epNotification.getMsgSource());
98                 epNotificationItemVO.setStartTime(epNotification.getStartTime());
99                 epNotificationItemVO.setEndTime(epNotification.getEndTime());
100                 epNotificationItemVO.setPriority(epNotification.getPriority());
101                 epNotificationItemVO.setCreatorId(epNotification.getCreatorId());
102                 epNotificationItemVO.setCreatedDate(epNotification.getCreatedDate());
103                 epNotificationItemVO.setLoginId(epNotification.getLoginId());
104                 epNotificationItemVO.setNotificationHyperlink(epNotification.getNotificationHyperlink());
105                 epNotificationItemVO.setId(epNotification.getId());
106                 epNotificationItemVO.setCreated(epNotification.getCreated());
107                 epNotificationItemVO.setModified(epNotification.getModified());
108                 epNotificationItemVO.setCreatedId(epNotification.getCreatedId());
109                 epNotificationItemVO.setModifiedId(epNotification.getModifiedId());
110                 epNotificationItemVO.setRowNum(epNotification.getRowNum());
111                 
112                 epNotificationItemVO.setAuditUserId(epNotification.getAuditUserId());
113                 epNotificationItemVO.setAuditTrail(epNotification.getAuditTrail());
114                 
115                 
116         }
117 }