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.aai;
18 import static org.junit.Assert.assertEquals;
20 import java.util.ArrayList;
21 import java.util.List;
23 import org.junit.Test;
25 public class CloudRegionDetailTest {
27 public void getterAndSetter4CloudOwner(){
28 final String cloudOwner = "cloud-owner-test";
29 CloudRegionDetail cloudRegion = new CloudRegionDetail();
30 cloudRegion.setCloudOwner(cloudOwner);
31 assertEquals(cloudRegion.getCloudOwner(), cloudOwner);
35 public void getterAndSetter4CloudRegionId(){
36 final String cloudRegionId = "cloud-region-id-test";
37 CloudRegionDetail cloudRegion = new CloudRegionDetail();
38 cloudRegion.setCloudRegionId(cloudRegionId);
39 assertEquals(cloudRegion.getCloudRegionId(), cloudRegionId);
43 public void getterAndSetter4CloudType(){
44 final String cloudType = "cloud-type-test";
45 CloudRegionDetail cloudRegion = new CloudRegionDetail();
46 cloudRegion.setCloudType(cloudType);
47 assertEquals(cloudRegion.getCloudType(), cloudType);
51 public void getterAndSetter4cloudRegionVersion(){
52 final String cloudRegionVersion = "cloud-region-version-test";
53 CloudRegionDetail cloudRegion = new CloudRegionDetail();
54 cloudRegion.setCloudRegionVersion(cloudRegionVersion);
55 assertEquals(cloudRegion.getCloudRegionVersion(), cloudRegionVersion);
59 public void getterAndSetter4ownerDefinedType(){
60 final String ownerDefinedType = "owner-defined-type-test";
61 CloudRegionDetail cloudRegion = new CloudRegionDetail();
62 cloudRegion.setOwnerDefinedType(ownerDefinedType);
63 assertEquals(cloudRegion.getOwnerDefinedType(), ownerDefinedType);
67 public void getterAndSetter4cloudZone(){
68 final String cloudZone = "cloudZone-test";
69 CloudRegionDetail cloudRegion = new CloudRegionDetail();
70 cloudRegion.setCloudZone(cloudZone);
71 assertEquals(cloudRegion.getCloudZone(), cloudZone);
75 public void getterAndSetter4complexName(){
76 final String complexName = "complexName-test";
77 CloudRegionDetail cloudRegion = new CloudRegionDetail();
78 cloudRegion.setComplexName(complexName);
79 assertEquals(cloudRegion.getComplexName(), complexName);
83 public void getterAndSetter4cloudExtraInfo(){
84 final String cloudExtraInfo = "cloudExtraInfo-test";
85 CloudRegionDetail cloudRegion = new CloudRegionDetail();
86 cloudRegion.setCloudExtraInfo(cloudExtraInfo);
87 assertEquals(cloudRegion.getCloudExtraInfo(), cloudExtraInfo);
91 public void getterAndSetter4esrSystemInfoList(){
92 final EsrSystemInfoList esrSystemInfoList = new EsrSystemInfoList();
93 List<EsrSystemInfo> esrSystemInfo = new ArrayList<>();
94 EsrSystemInfo esrSystemInfoObj = new EsrSystemInfo();
95 esrSystemInfoObj.setEsrSystemInfoId("123");
96 esrSystemInfo.add(esrSystemInfoObj );
97 esrSystemInfoList.setEsrSystemInfo(esrSystemInfo);
98 CloudRegionDetail cloudRegion = new CloudRegionDetail();
99 cloudRegion.setEsrSystemInfoList(esrSystemInfoList);
100 assertEquals(cloudRegion.getEsrSystemInfoList(), esrSystemInfoList);