6707a3daad494806b4267770422156b6d385e230
[vfc/nfvo/driver/vnfm/gvnfm.git] / juju / juju-vnfmadapter / Juju-vnfmadapterService / service / src / test / java / org / openo / nfvo / jujuvnfmadapter / service / entity / JujuVnfmInfoTest.java
1 /*
2  * Copyright 2016 Huawei Technologies Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package org.openo.nfvo.jujuvnfmadapter.service.entity;
18
19 import static org.junit.Assert.assertNull;
20 import static org.junit.Assert.assertNotNull;
21 import static org.junit.Assert.assertEquals;
22 import static org.junit.Assert.assertFalse;
23 import static org.junit.Assert.assertTrue;
24
25 import org.junit.Test;
26
27 import java.util.Date;
28
29 public class JujuVnfmInfoTest {
30
31         @Test
32         public void testSetId() {
33                 JujuVnfmInfo jujuVnfmInfo = new JujuVnfmInfo();
34                 jujuVnfmInfo.setId("testSetId");
35                 String result = jujuVnfmInfo.getId();
36                 assertEquals("testSetId", result);
37         }
38
39         @Test
40         public void testGetId() {
41                 JujuVnfmInfo jujuVnfmInfo = new JujuVnfmInfo();
42                 String result = jujuVnfmInfo.getId();
43                 assertNull(result);
44         }
45
46         @Test
47         public void testSetVnfmId() {
48                 JujuVnfmInfo jujuVnfmInfo = new JujuVnfmInfo();
49                 jujuVnfmInfo.setVnfmId("testSetVnfmId");
50                 String result = jujuVnfmInfo.getVnfmId();
51                 assertEquals("testSetVnfmId", result);
52         }
53
54         @Test
55         public void testGetVnfmId() {
56                 JujuVnfmInfo jujuVnfmInfo = new JujuVnfmInfo();
57                 String result = jujuVnfmInfo.getVnfmId();
58                 assertNull(result);
59         }
60
61         @Test
62         public void testSetVnfId() {
63                 JujuVnfmInfo jujuVnfmInfo = new JujuVnfmInfo();
64                 jujuVnfmInfo.setVnfId("testSetVnfId");
65                 String result = jujuVnfmInfo.getVnfId();
66                 assertEquals("testSetVnfId", result);
67         }
68
69         @Test
70         public void testGetVnfId() {
71                 JujuVnfmInfo jujuVnfmInfo = new JujuVnfmInfo();
72                 String result = jujuVnfmInfo.getVnfId();
73                 assertNull(result);
74         }
75
76         @Test
77         public void testSetAppName() {
78                 JujuVnfmInfo jujuVnfmInfo = new JujuVnfmInfo();
79                 jujuVnfmInfo.setAppName("testSetAppName");
80                 String result = jujuVnfmInfo.getAppName();
81                 assertEquals("testSetAppName", result);
82         }
83
84         @Test
85         public void testGetAppName() {
86                 JujuVnfmInfo jujuVnfmInfo = new JujuVnfmInfo();
87                 String result = jujuVnfmInfo.getAppName();
88                 assertNull(result);
89         }
90
91         @Test
92         public void testSetJobId() {
93                 JujuVnfmInfo jujuVnfmInfo = new JujuVnfmInfo();
94                 jujuVnfmInfo.setJobId("testSetJobId");
95                 String result = jujuVnfmInfo.getJobId();
96                 assertEquals("testSetJobId", result);
97         }
98
99         @Test
100         public void testGetJobId() {
101                 JujuVnfmInfo jujuVnfmInfo = new JujuVnfmInfo();
102                 String result = jujuVnfmInfo.getJobId();
103                 assertNull(result);
104         }
105
106         @Test
107         public void testSetStatus() {
108                 JujuVnfmInfo jujuVnfmInfo = new JujuVnfmInfo();
109                 jujuVnfmInfo.setStatus(0);
110                 Integer result = jujuVnfmInfo.getStatus();
111                 assertEquals(Integer.valueOf(0), result);
112         }
113
114         @Test
115         public void testGetStatus() {
116                 JujuVnfmInfo jujuVnfmInfo = new JujuVnfmInfo();
117                 Integer result = jujuVnfmInfo.getStatus();
118                 assertNull(result);
119         }
120
121         @Test
122         public void testSetCreateTime() {
123                 JujuVnfmInfo jujuVnfmInfo = new JujuVnfmInfo();
124                 jujuVnfmInfo.setCreateTime(new Date());
125                 Date result = jujuVnfmInfo.getCreateTime();
126                 assertEquals(new Date(), result);
127         }
128
129         @Test
130         public void testGetCreateTime() {
131                 JujuVnfmInfo jujuVnfmInfo = new JujuVnfmInfo();
132                 Date result = jujuVnfmInfo.getCreateTime();
133                 assertNull(result);
134         }
135
136         @Test
137         public void testSetModifyTime() {
138                 JujuVnfmInfo jujuVnfmInfo = new JujuVnfmInfo();
139                 jujuVnfmInfo.setModifyTime(new Date());
140                 Date result = jujuVnfmInfo.getModifyTime();
141                 assertEquals(new Date(), result);
142         }
143
144         @Test
145         public void testGetModifyTime() {
146                 JujuVnfmInfo jujuVnfmInfo = new JujuVnfmInfo();
147                 Date result = jujuVnfmInfo.getModifyTime();
148                 assertNull(result);
149         }
150
151         @Test
152         public void testSetDeleteTime() {
153                 JujuVnfmInfo jujuVnfmInfo = new JujuVnfmInfo();
154                 jujuVnfmInfo.setDeleteTime(new Date());
155                 Date result = jujuVnfmInfo.getDeleteTime();
156                 assertEquals(new Date(), result);
157         }
158
159         @Test
160         public void testGetDeleteTime() {
161                 JujuVnfmInfo jujuVnfmInfo = new JujuVnfmInfo();
162                 Date result = jujuVnfmInfo.getDeleteTime();
163                 assertNull(result);
164         }
165
166         @Test
167         public void testSetExtend() {
168                 JujuVnfmInfo jujuVnfmInfo = new JujuVnfmInfo();
169                 jujuVnfmInfo.setExtend("testSetExtend");
170                 String result = jujuVnfmInfo.getExtend();
171                 assertEquals("testSetExtend", result);
172         }
173
174         @Test
175         public void testGetExtend() {
176                 JujuVnfmInfo jujuVnfmInfo = new JujuVnfmInfo();
177                 String result = jujuVnfmInfo.getExtend();
178                 assertNull(result);
179         }
180
181
182 }