migrate model-impl from drools-applications
[policy/models.git] / models-interactions / model-impl / aai / src / test / java / org / onap / policy / aai / AaiNqGenericVnfTest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * aai
4  * ================================================================================
5  * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
6  * Modifications Copyright (C) 2019 Nordix Foundation.
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *      http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  */
21
22 package org.onap.policy.aai;
23
24 import static org.junit.Assert.assertEquals;
25 import static org.junit.Assert.assertNotNull;
26
27 import org.junit.AfterClass;
28 import org.junit.BeforeClass;
29 import org.junit.Test;
30
31 public class AaiNqGenericVnfTest {
32
33     @BeforeClass
34     public static void setUpBeforeClass() throws Exception {}
35
36     @AfterClass
37     public static void tearDownAfterClass() throws Exception {}
38
39     @Test
40     public void test() {
41         AaiNqGenericVnf aaiNqGenericVnf = new AaiNqGenericVnf();
42         aaiNqGenericVnf.setEncrypedAccessFlag(true);
43         aaiNqGenericVnf.setInMaint(false);
44         aaiNqGenericVnf.setIpv4Loopback0Address("aa");
45         aaiNqGenericVnf.setIpv4OamAddress("oamAddress");
46         aaiNqGenericVnf.setIsClosedLoopDisabled(false);
47         aaiNqGenericVnf.setModelInvariantId("653d2caa-7e47-4614-95b3-26c8d82755b8");
48         aaiNqGenericVnf.setModelVersionId("98f410f6-4c63-447b-97d2-42508437cec0");
49         aaiNqGenericVnf.setModelCustomizationId("SomeCustomizationId");
50         aaiNqGenericVnf.setOperationalState("active");
51         aaiNqGenericVnf.setPersonaModelId("653d2caa-7e47-4614-95b3-26c8d82755b8");
52         aaiNqGenericVnf.setPersonaModelVersion("98f410f6-4c63-447b-97d2-42508437cec0");
53         aaiNqGenericVnf.setProvStatus("complete");
54         aaiNqGenericVnf.setResourceVersion("1505056714553");
55         aaiNqGenericVnf.setServiceId("e8cb8968-5411-478b-906a-f28747de72cd");
56         aaiNqGenericVnf.setVnfId("ed8b2bce-6b27-4089-992c-4a2c66024bcd");
57         aaiNqGenericVnf.setVnfName("vCPEInfraVNF14a");
58         aaiNqGenericVnf.setVnfName2("malumabb12");
59         aaiNqGenericVnf.setVnfType("vCPEInfraService10/vCPEInfraService10 0");
60         assertNotNull(aaiNqGenericVnf);
61
62         assertEquals(true, aaiNqGenericVnf.getEncrypedAccessFlag());
63         assertEquals(false, aaiNqGenericVnf.getInMaint());
64         assertEquals("aa", aaiNqGenericVnf.getIpv4Loopback0Address());
65         assertEquals("oamAddress", aaiNqGenericVnf.getIpv4OamAddress());
66         assertEquals(false, aaiNqGenericVnf.getIsClosedLoopDisabled());
67         assertEquals("653d2caa-7e47-4614-95b3-26c8d82755b8", aaiNqGenericVnf.getModelInvariantId());
68         assertEquals("98f410f6-4c63-447b-97d2-42508437cec0", aaiNqGenericVnf.getModelVersionId());
69         assertEquals("SomeCustomizationId", aaiNqGenericVnf.getModelCustomizationId());
70         assertEquals("active", aaiNqGenericVnf.getOperationalState());
71         assertEquals("653d2caa-7e47-4614-95b3-26c8d82755b8", aaiNqGenericVnf.getPersonaModelId());
72         assertEquals("98f410f6-4c63-447b-97d2-42508437cec0", aaiNqGenericVnf.getPersonaModelVersion());
73         assertEquals("complete", aaiNqGenericVnf.getProvStatus());
74         assertEquals("1505056714553", aaiNqGenericVnf.getResourceVersion());
75         assertEquals("e8cb8968-5411-478b-906a-f28747de72cd", aaiNqGenericVnf.getServiceId());
76         assertEquals("ed8b2bce-6b27-4089-992c-4a2c66024bcd", aaiNqGenericVnf.getVnfId());
77         assertEquals("vCPEInfraVNF14a", aaiNqGenericVnf.getVnfName());
78         assertEquals("malumabb12", aaiNqGenericVnf.getVnfName2());
79         assertEquals("vCPEInfraService10/vCPEInfraService10 0", aaiNqGenericVnf.getVnfType());
80     }
81
82 }