Adding test cases to aai-core to increase coverage
[aai/aai-common.git] / aai-core / src / test / java / org / onap / aai / domain / translog / TransactionLogEntryTest.java
1 /**
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
4  * ================================================================================
5  * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *    http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.aai.domain.translog;
22
23 import com.google.common.collect.ArrayListMultimap;
24 import com.google.common.collect.Multimap;
25 import org.junit.Assert;
26 import org.junit.Before;
27 import org.junit.Test;
28 import org.onap.aai.AAISetup;
29 import org.onap.aai.domain.model.AAIResource;
30
31 import java.util.ArrayList;
32 import java.util.HashMap;
33 import java.util.List;
34 import java.util.Map;
35
36 public class TransactionLogEntryTest extends AAISetup {
37     private TransactionLogEntry transactionLogEntry;
38
39     @Before
40     public void setUp() {
41         transactionLogEntry = new TransactionLogEntry();
42     }
43
44     @Test
45     public void testGetterSetterTransactionLogEntryId() {
46         String testTransactionLogEntryId = "testTransactionLogEntryId";
47         transactionLogEntry.setTransactionLogEntryId(testTransactionLogEntryId);
48         Assert.assertEquals(testTransactionLogEntryId, transactionLogEntry.getTransactionLogEntryId());
49     }
50
51     @Test
52     public void testGetterSetterStatus() {
53         String testStatus = "testStatus";
54         transactionLogEntry.setStatus(testStatus);
55         Assert.assertEquals(testStatus, transactionLogEntry.getStatus());
56     }
57
58     @Test
59     public void testGetterSetterRqstDate() {
60         String testRqstDate = "testRqstDate";
61         transactionLogEntry.setRqstDate(testRqstDate);
62         Assert.assertEquals(testRqstDate, transactionLogEntry.getRqstDate());
63     }
64
65     @Test
66     public void testGetterSetterRespDate() {
67         String testRespDate = "testRespDate";
68         transactionLogEntry.setRespDate(testRespDate);
69         Assert.assertEquals(testRespDate, transactionLogEntry.getRespDate());
70     }
71
72     @Test
73     public void testGetterSetterSourceId() {
74         String testSourceId = "testSourceId";
75         transactionLogEntry.setSourceId(testSourceId);
76         Assert.assertEquals(testSourceId, transactionLogEntry.getSourceId());
77     }
78
79     @Test
80     public void testGetterSetterResourceId() {
81         String testResourceId = "testResourceId";
82         transactionLogEntry.setResourceId(testResourceId);
83         Assert.assertEquals(testResourceId, transactionLogEntry.getResourceId());
84     }
85
86     @Test
87     public void testGetterSetterResourceType() {
88         String testResourceType = "testResourceType";
89         transactionLogEntry.setResourceType(testResourceType);
90         Assert.assertEquals(testResourceType, transactionLogEntry.getResourceType());
91     }
92
93     @Test
94     public void testGetterSetterRqstBuf() {
95         String testRqstBuf = "testRqstBuf";
96         transactionLogEntry.setRqstBuf(testRqstBuf);
97         Assert.assertEquals(testRqstBuf, transactionLogEntry.getRqstBuf());
98     }
99
100     @Test
101     public void testGetterSetterRespBuf() {
102         String testRespBuf = "testRespBuf";
103         transactionLogEntry.setrespBuf(testRespBuf);
104         Assert.assertEquals(testRespBuf, transactionLogEntry.getrespBuf());
105     }
106
107     @Test
108     public void testGetterSetterNotificationPayload() {
109         String testNotificationPayload = "testNotificationPayload";
110         transactionLogEntry.setNotificationPayload(testNotificationPayload);
111         Assert.assertEquals(testNotificationPayload, transactionLogEntry.getNotificationPayload());
112     }
113
114     @Test
115     public void testGetterSetterNotificationId() {
116         String testNotificationId = "testNotificationId";
117         transactionLogEntry.setNotificationId(testNotificationId);
118         Assert.assertEquals(testNotificationId, transactionLogEntry.getNotificationId());
119     }
120
121     @Test
122     public void testGetterSetterNotificationStatus() {
123         String testNotificationStatus = "testNotificationStatus";
124         transactionLogEntry.setNotificationStatus(testNotificationStatus);
125         Assert.assertEquals(testNotificationStatus, transactionLogEntry.getNotificationStatus());
126     }
127
128     @Test
129     public void testGetterSetterNotificationTopic() {
130         String testNotificationTopic = "testNotificationTopic";
131         transactionLogEntry.setNotificationTopic(testNotificationTopic);
132         Assert.assertEquals(testNotificationTopic, transactionLogEntry.getNotificationTopic());
133     }
134
135     @Test
136     public void testGetterSetterNotificationEntityLink() {
137         String testNotificationEntityLink = "testNotificationEntityLink";
138         transactionLogEntry.setNotificationEntityLink(testNotificationEntityLink);
139         Assert.assertEquals(testNotificationEntityLink, transactionLogEntry.getNotificationEntityLink());
140     }
141
142     @Test
143     public void testGetterSetterNotificationAction() {
144         String testNotificationAction = "testNotificationAction";
145         transactionLogEntry.setNotificationAction(testNotificationAction);
146         Assert.assertEquals(testNotificationAction, transactionLogEntry.getNotificationAction());
147     }
148 }