Add unit test for PNF registration function.
[aai/esr-server.git] / esr-mgr / src / test / java / org / onap / aai / esr / entity / aai / PnfTest.java
1 /**
2  * Copyright 2018 ZTE Corporation.
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 package org.onap.aai.esr.entity.aai;
17
18 import static org.junit.Assert.assertEquals;
19 import org.junit.Test;
20
21 public class PnfTest {
22
23     @Test
24     public void getterAndSetter4pnfName() {
25         final String pnfName = "pnf1";
26         Pnf pnf = new Pnf();
27         pnf.setPnfName(pnfName);
28         assertEquals(pnf.getPnfName(), pnfName);
29     }
30     
31     @Test
32     public void getterAndSetter4pnfName2() {
33         final String pnfName2 = "pnf2";
34         Pnf pnf = new Pnf();
35         pnf.setPnfName2(pnfName2);
36         assertEquals(pnf.getPnfName2(), pnfName2);
37     }
38     
39     @Test
40     public void getterAndSetter4pnfId() {
41         final String pnfId = "123";
42         Pnf pnf = new Pnf();
43         pnf.setPnfId(pnfId);
44         assertEquals(pnf.getPnfId(), pnfId);
45     }
46     
47     @Test
48     public void getterAndSetter4equipType() {
49         final String equipType = "pnf1";
50         Pnf pnf = new Pnf();
51         pnf.setEquipType(equipType);
52         assertEquals(pnf.getEquipType(), equipType);
53     }
54     
55     @Test
56     public void getterAndSetter4equipVendor() {
57         final String equipVendor = "ZTE";
58         Pnf pnf = new Pnf();
59         pnf.setEquipVendor(equipVendor);
60         assertEquals(pnf.getEquipVendor(), equipVendor);
61     }
62     
63     @Test
64     public void getterAndSetter4equipModel() {
65         final String equipModel = "pnfdId1";
66         Pnf pnf = new Pnf();
67         pnf.setEquipModel(equipModel);
68         assertEquals(pnf.getEquipModel(), equipModel);
69     }
70     
71     @Test
72     public void getterAndSetter4managementOption() {
73         final String managementOption = "emsId1";
74         Pnf pnf = new Pnf();
75         pnf.setManagementOption(managementOption);
76         assertEquals(pnf.getManagementOption(), managementOption);
77     }
78     
79     @Test
80     public void getterAndSetter4inMaint() {
81         final boolean inMaint = false;
82         Pnf pnf = new Pnf();
83         pnf.setInMaint(inMaint);
84         assertEquals(pnf.isInMaint(), inMaint);
85     }
86     
87     @Test
88     public void getterAndSetter4frameId() {
89         final String frameId = "123.14-41.25";
90         Pnf pnf = new Pnf();
91         pnf.setFrameId(frameId);
92         assertEquals(pnf.getFrameId(), frameId);
93     }
94     
95     @Test
96     public void getterAndSetter4resourceVersion() {
97         final String resourceVersion = "1234";
98         Pnf pnf = new Pnf();
99         pnf.setResourceVersion(resourceVersion);
100         assertEquals(pnf.getResourceVersion(), resourceVersion);
101     }
102 }