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.aai.esr.entity.rest;
18 import static org.junit.Assert.assertEquals;
19 import java.util.ArrayList;
20 import java.util.List;
21 import org.junit.Test;
23 public class VimRegisterInfoTest {
25 public void getterAndSetter4cloudOwner() {
26 final String cloudOwner = "zte";
27 VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
28 vimRegisterInfo.setCloudOwner(cloudOwner);
29 assertEquals(vimRegisterInfo.getCloudOwner(), cloudOwner);
33 public void getterAndSetter4cloudRegionId() {
34 final String cloudRegionId = "region-one";
35 VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
36 vimRegisterInfo.setCloudRegionId(cloudRegionId);
37 assertEquals(vimRegisterInfo.getCloudRegionId(), cloudRegionId);
41 public void getterAndSetter4cloudType() {
42 final String cloudType = "openstack";
43 VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
44 vimRegisterInfo.setCloudType(cloudType);
45 assertEquals(vimRegisterInfo.getCloudType(), cloudType);
49 public void getterAndSetter4cloudRegionVersion() {
50 final String cloudRegionVersion = "v1.0";
51 VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
52 vimRegisterInfo.setCloudRegionVersion(cloudRegionVersion);
53 assertEquals(vimRegisterInfo.getCloudRegionVersion(), cloudRegionVersion);
57 public void getterAndSetter4ownerDefinedType() {
58 final String ownerDefinedType = "test";
59 VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
60 vimRegisterInfo.setOwnerDefinedType(ownerDefinedType);
61 assertEquals(vimRegisterInfo.getOwnerDefinedType(), ownerDefinedType);
65 public void getterAndSetter4cloudZone() {
66 final String cloudZone = "zone1";
67 VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
68 vimRegisterInfo.setCloudZone(cloudZone);
69 assertEquals(vimRegisterInfo.getCloudZone(), cloudZone);
73 public void getterAndSetter4complexName() {
74 final String complexName = "test";
75 VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
76 vimRegisterInfo.setComplexName(complexName);
77 assertEquals(vimRegisterInfo.getComplexName(), complexName);
81 public void getterAndSetter4cloudExtraInfo() {
82 final String cloudExtraInfo = "test";
83 VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
84 vimRegisterInfo.setCloudExtraInfo(cloudExtraInfo);
85 assertEquals(vimRegisterInfo.getCloudExtraInfo(), cloudExtraInfo);
89 public void getterAndSetter4status() {
90 final String status = "normal";
91 VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
92 vimRegisterInfo.setStatus(status);
93 assertEquals(vimRegisterInfo.getStatus(), status);
97 public void getterAndSetter4vimAuthInfos() {
98 final List<VimAuthInfo> vimAuthInfos = new ArrayList<>();
99 VimRegisterInfo vimRegisterInfo = new VimRegisterInfo();
100 vimRegisterInfo.setVimAuthInfos(vimAuthInfos);
101 assertEquals(vimRegisterInfo.getVimAuthInfos(), vimAuthInfos);