2 * Copyright 2017 ZTE Corporation.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 package org.onap.holmes.common.aai.entity;
18 import static org.hamcrest.CoreMatchers.equalTo;
19 import static org.junit.Assert.*;
21 import org.junit.Before;
22 import org.junit.Test;
24 public class VnfEntityTest {
26 private VnfEntity vnfEntity;
30 vnfEntity = new VnfEntity();
34 public void testVnfEntity_getter_setter() {
35 boolean inMaint = false;
36 boolean closedLoopDisabled = true;
37 String orchestrationStatus = "hello";
38 String provStatus = "world";
39 String resourceVersion = "seldsw";
40 String serviceId = "versio";
41 String vnfId = "12345";
42 String vnfName = "lllss";
43 String vnfType = "qwertt";
44 vnfEntity.setInMaint(inMaint);
45 vnfEntity.setClosedLoopDisabled(closedLoopDisabled);
46 vnfEntity.setOrchestrationStatus(orchestrationStatus);
47 vnfEntity.setProvStatus(provStatus);
48 vnfEntity.setResourceVersion(resourceVersion);
49 vnfEntity.setServiceId(serviceId);
50 vnfEntity.setVnfId(vnfId);
51 vnfEntity.setVnfName(vnfName);
52 vnfEntity.setVnfType(vnfType);
53 assertThat(inMaint, equalTo(vnfEntity.getInMaint()));
54 assertThat(closedLoopDisabled, equalTo(vnfEntity.getClosedLoopDisabled()));
55 assertThat(orchestrationStatus, equalTo(vnfEntity.getOrchestrationStatus()));
56 assertThat(provStatus, equalTo(vnfEntity.getProvStatus()));
57 assertThat(resourceVersion, equalTo(vnfEntity.getResourceVersion()));
58 assertThat(serviceId, equalTo(vnfEntity.getServiceId()));
59 assertThat(vnfId, equalTo(vnfEntity.getVnfId()));
60 assertThat(vnfName, equalTo(vnfEntity.getVnfName()));
61 assertThat(vnfType, equalTo(vnfEntity.getVnfType()));
62 assertThat(true, equalTo(vnfEntity.getRelationshipList() != null));