2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
20 package org.openecomp.mso.openstack.beans;
22 import org.junit.Test;
24 import java.util.Arrays;
25 import java.util.Collections;
27 public class SubnetTest {
29 Subnet subnet = new Subnet();
32 public void getSubnetName() throws Exception {
33 subnet.getSubnetName();
37 public void setSubnetName() throws Exception {
38 subnet.setSubnetName("test");
42 public void getAllocationPools() throws Exception {
43 subnet.getAllocationPools();
47 public void getCidr() throws Exception {
52 public void getDnsNameServers() throws Exception {
53 subnet.getDnsNameServers();
57 public void getEnableDHCP() throws Exception {
58 subnet.getEnableDHCP();
62 public void getAddrFromStart() throws Exception {
63 subnet.getAddrFromStart();
67 public void setAddrFromStart() throws Exception {
68 subnet.setAddrFromStart(true);
72 public void getGatewayIp() throws Exception {
73 subnet.getGatewayIp();
77 public void getHostRoutes() throws Exception {
78 subnet.getHostRoutes();
82 public void getNeutronId() throws Exception {
83 subnet.getNeutronId();
87 public void getIpVersion() throws Exception {
88 subnet.getIpVersion();
92 public void getSubnetId() throws Exception {
97 public void setAllocationPools() throws Exception {
98 subnet.setAllocationPools(Arrays.asList());
102 public void setCidr() throws Exception {
103 subnet.setCidr("255.255.255.0");
107 public void setDnsNameServers() throws Exception {
108 subnet.setDnsNameServers(Arrays.asList());
112 public void setEnableDHCP() throws Exception {
113 subnet.setEnableDHCP(true);
117 public void setGatewayIp() throws Exception {
118 subnet.setGatewayIp("192.168.0.1");
122 public void setHostRoutes() throws Exception {
123 subnet.setHostRoutes(Collections.emptyList());
127 public void setNeutronId() throws Exception {
128 subnet.setNeutronId("test");
132 public void setIpVersion() throws Exception {
133 subnet.setIpVersion("ipv4");
137 public void setSubnetId() throws Exception {
138 subnet.setSubnetId("1.0.0.0");