2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2018 TechMahindra
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=========================================================
21 package org.onap.so.openstack.beans;
23 import static org.junit.Assert.*;
24 import java.util.ArrayList;
25 import java.util.List;
26 import org.junit.Test;
27 import org.mockito.InjectMocks;
28 import org.mockito.Mock;
29 import org.onap.so.entity.MsoRequest;
31 public class NetworkRollbackTest {
33 MsoRequest ms = new MsoRequest();
36 NetworkRollback nr = new NetworkRollback();
40 List<Integer> vlans = new ArrayList();
43 nr.setCloudId("cloudId");
44 nr.setModelCustomizationUuid("modelCustomizationUuid");
45 nr.setNetworkId("networkId");
46 nr.setNetworkName("networkName");
47 nr.setNetworkStackId("networkStackId");
48 nr.setNetworkType("networkType");;
49 nr.setNeutronNetworkId("neutronNetworkId");
50 nr.setPhysicalNetwork("physicalNetwork");
51 nr.setTenantId("tenantId");
52 nr.setNetworkCreated(false);
55 assert(nr.getCloudId().equals("cloudId"));
56 assert(nr.getModelCustomizationUuid().equals("modelCustomizationUuid"));
57 assert(nr.getNetworkId().equals("networkId"));
58 assert(nr.getNetworkName().equals("networkName"));
59 assert(nr.getNetworkStackId().equals("networkStackId"));
60 assert(nr.getNeutronNetworkId().equals("neutronNetworkId"));
61 assert(nr.getPhysicalNetwork().equals("physicalNetwork"));
62 assert(nr.getNetworkType().equals("networkType"));
63 assert(nr.getTenantId().equals("tenantId"));
64 assert(nr.getMsoRequest().equals(ms));
65 assertFalse(nr.getNetworkCreated());
66 assert(nr.getVlans().equals(vlans));
67 assert(nr.toString()!=null);