diff options
Diffstat (limited to 'adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkRequestESTest.java')
-rw-r--r-- | adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkRequestESTest.java | 353 |
1 files changed, 353 insertions, 0 deletions
diff --git a/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkRequestESTest.java b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkRequestESTest.java new file mode 100644 index 0000000000..f7703d5853 --- /dev/null +++ b/adapters/mso-adapters-rest-interface/src/test/java/org/openecomp/mso/adapters/nwrest/UpdateNetworkRequestESTest.java @@ -0,0 +1,353 @@ +/* + * This file was automatically generated by EvoSuite + * Mon Nov 14 09:13:39 GMT 2016 + */ + +package org.openecomp.mso.adapters.nwrest; + +import org.junit.Test; +import static org.junit.Assert.*; +import static org.evosuite.runtime.EvoAssertions.*; + +import org.openecomp.mso.entity.MsoRequest; +import org.openecomp.mso.openstack.beans.Subnet; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import org.evosuite.runtime.EvoRunner; +import org.evosuite.runtime.EvoRunnerParameters; +import org.junit.runner.RunWith; + +@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) +public class UpdateNetworkRequestESTest extends UpdateNetworkRequestESTestscaffolding { + + @Test(timeout = 4000) + public void test00() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + updateNetworkRequest0.setNetworkTechnology("NEUTRON"); + assertNull(updateNetworkRequest0.getNetworkStackId()); + } + + @Test(timeout = 4000) + public void test01() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + updateNetworkRequest0.setTenantId(""); + String string0 = updateNetworkRequest0.getTenantId(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test02() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + LinkedList<Subnet> linkedList0 = new LinkedList<Subnet>(); + Subnet subnet0 = new Subnet(); + linkedList0.addLast(subnet0); + updateNetworkRequest0.setSubnets(linkedList0); + List<Subnet> list0 = updateNetworkRequest0.getSubnets(); + assertEquals(1, list0.size()); + } + + @Test(timeout = 4000) + public void test03() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + LinkedList<Integer> linkedList0 = new LinkedList<Integer>(); + ProviderVlanNetwork providerVlanNetwork0 = new ProviderVlanNetwork("NEUTRON", (List<Integer>) linkedList0); + updateNetworkRequest0.setProviderVlanNetwork(providerVlanNetwork0); + ProviderVlanNetwork providerVlanNetwork1 = updateNetworkRequest0.getProviderVlanNetwork(); + assertSame(providerVlanNetwork1, providerVlanNetwork0); + } + + @Test(timeout = 4000) + public void test04() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + updateNetworkRequest0.setNetworkTypeVersion("$7/{y&^~o(,9x11)BHX"); + String string0 = updateNetworkRequest0.getNetworkTypeVersion(); + assertEquals("$7/{y&^~o(,9x11)BHX", string0); + } + + @Test(timeout = 4000) + public void test05() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + updateNetworkRequest0.setNetworkTypeVersion(""); + String string0 = updateNetworkRequest0.getNetworkTypeVersion(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test06() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + updateNetworkRequest0.setNetworkType("IW4N;?_XL%q;"); + String string0 = updateNetworkRequest0.getNetworkType(); + assertEquals("IW4N;?_XL%q;", string0); + } + + @Test(timeout = 4000) + public void test07() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + updateNetworkRequest0.setNetworkStackId("Allocation_pool [start="); + String string0 = updateNetworkRequest0.getNetworkStackId(); + assertEquals("Allocation_pool [start=", string0); + } + + @Test(timeout = 4000) + public void test08() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + updateNetworkRequest0.setNetworkStackId(""); + String string0 = updateNetworkRequest0.getNetworkStackId(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test09() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + HashMap<String, String> hashMap0 = new HashMap<String, String>(); + hashMap0.put("", ""); + updateNetworkRequest0.setNetworkParams(hashMap0); + Map<String, String> map0 = updateNetworkRequest0.getNetworkParams(); + assertFalse(map0.isEmpty()); + } + + @Test(timeout = 4000) + public void test10() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + updateNetworkRequest0.setNetworkName("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<updateNetworkRequest>\n <skipAAI>false</skipAAI>\n <backout>true</backout>\n <msoRequest/>\n <networkParams/>\n <networkTechnology>NEUTRON</networkTechnology>\n</updateNetworkRequest>\n"); + String string0 = updateNetworkRequest0.getNetworkName(); + assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<updateNetworkRequest>\n <skipAAI>false</skipAAI>\n <backout>true</backout>\n <msoRequest/>\n <networkParams/>\n <networkTechnology>NEUTRON</networkTechnology>\n</updateNetworkRequest>\n", string0); + } + + @Test(timeout = 4000) + public void test11() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + updateNetworkRequest0.setNetworkName(""); + String string0 = updateNetworkRequest0.getNetworkName(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test12() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + updateNetworkRequest0.setNetworkId(""); + String string0 = updateNetworkRequest0.getNetworkId(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test13() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + updateNetworkRequest0.setMsoRequest((MsoRequest) null); + MsoRequest msoRequest0 = updateNetworkRequest0.getMsoRequest(); + assertNull(msoRequest0); + } + + @Test(timeout = 4000) + public void test14() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + ContrailNetwork contrailNetwork0 = new ContrailNetwork(); + updateNetworkRequest0.setContrailNetwork(contrailNetwork0); + ContrailNetwork contrailNetwork1 = updateNetworkRequest0.getContrailNetwork(); + assertEquals("false", contrailNetwork1.getShared()); + } + + @Test(timeout = 4000) + public void test15() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + updateNetworkRequest0.setCloudSiteId("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<updateNetworkRequest>\n <skipAAI>false</skipAAI>\n <backout>true</backout>\n <msoRequest>\n <requestId></requestId>\n <serviceInstanceId></serviceInstanceId>\n </msoRequest>\n <networkParams/>\n <networkTechnology>NEUTRON</networkTechnology>\n</updateNetworkRequest>\n"); + String string0 = updateNetworkRequest0.getCloudSiteId(); + assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<updateNetworkRequest>\n <skipAAI>false</skipAAI>\n <backout>true</backout>\n <msoRequest>\n <requestId></requestId>\n <serviceInstanceId></serviceInstanceId>\n </msoRequest>\n <networkParams/>\n <networkTechnology>NEUTRON</networkTechnology>\n</updateNetworkRequest>\n", string0); + } + + @Test(timeout = 4000) + public void test16() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + updateNetworkRequest0.setBackout((Boolean) null); + Boolean boolean0 = updateNetworkRequest0.getBackout(); + assertNull(boolean0); + } + + @Test(timeout = 4000) + public void test17() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + Boolean boolean0 = Boolean.valueOf(false); + updateNetworkRequest0.setBackout(boolean0); + Boolean boolean1 = updateNetworkRequest0.getBackout(); + assertFalse(boolean1); + } + + @Test(timeout = 4000) + public void test18() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + // Undeclared exception! + try { + updateNetworkRequest0.setNetworkTechnology((String) null); + fail("Expecting exception: NullPointerException"); + + } catch(NullPointerException e) { + // + // no message in exception (getMessage() returned null) + // + verifyException("org.openecomp.mso.adapters.nwrest.UpdateNetworkRequest", e); + } + } + + @Test(timeout = 4000) + public void test19() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + ContrailNetwork contrailNetwork0 = updateNetworkRequest0.getContrailNetwork(); + assertNull(contrailNetwork0); + } + + @Test(timeout = 4000) + public void test20() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + List<Subnet> list0 = updateNetworkRequest0.getSubnets(); + assertNull(list0); + } + + @Test(timeout = 4000) + public void test21() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + Boolean boolean0 = updateNetworkRequest0.getBackout(); + assertTrue(boolean0); + } + + @Test(timeout = 4000) + public void test22() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + String string0 = updateNetworkRequest0.getNetworkType(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test23() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + String string0 = updateNetworkRequest0.getTenantId(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test24() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + MsoRequest msoRequest0 = updateNetworkRequest0.getMsoRequest(); + assertNull(msoRequest0.getServiceInstanceId()); + } + + @Test(timeout = 4000) + public void test25() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + String string0 = updateNetworkRequest0.getNetworkName(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test26() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + String string0 = updateNetworkRequest0.getNetworkId(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test27() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + Map<String, String> map0 = updateNetworkRequest0.getNetworkParams(); + assertEquals(0, map0.size()); + } + + @Test(timeout = 4000) + public void test28() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + ProviderVlanNetwork providerVlanNetwork0 = updateNetworkRequest0.getProviderVlanNetwork(); + assertNull(providerVlanNetwork0); + } + + @Test(timeout = 4000) + public void test29() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + String string0 = updateNetworkRequest0.getCloudSiteId(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test30() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + String string0 = updateNetworkRequest0.getNetworkTechnology(); + assertEquals("NEUTRON", string0); + } + + @Test(timeout = 4000) + public void test31() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + String string0 = updateNetworkRequest0.getNetworkTypeVersion(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test32() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + String string0 = updateNetworkRequest0.getNetworkStackId(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test33() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + boolean boolean0 = updateNetworkRequest0.isContrailRequest(); + assertFalse(boolean0); + } + + @Test(timeout = 4000) + public void test34() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + updateNetworkRequest0.setNetworkId("}!c9td^-G>0|Ac"); + String string0 = updateNetworkRequest0.getNetworkId(); + assertEquals("}!c9td^-G>0|Ac", string0); + } + + @Test(timeout = 4000) + public void test35() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + LinkedList<Subnet> linkedList0 = new LinkedList<Subnet>(); + updateNetworkRequest0.setSubnets(linkedList0); + List<Subnet> list0 = updateNetworkRequest0.getSubnets(); + assertTrue(list0.isEmpty()); + } + + @Test(timeout = 4000) + public void test36() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + updateNetworkRequest0.setNetworkTechnology("X$XC7&D7JVmMj3FS."); + assertTrue(updateNetworkRequest0.isSynchronous()); + } + + @Test(timeout = 4000) + public void test37() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + updateNetworkRequest0.setCloudSiteId(""); + String string0 = updateNetworkRequest0.getCloudSiteId(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test38() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + updateNetworkRequest0.setTenantId("X$XC7&D7JVmMj3FS."); + String string0 = updateNetworkRequest0.getTenantId(); + assertEquals("X$XC7&D7JVmMj3FS.", string0); + } + + @Test(timeout = 4000) + public void test39() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + updateNetworkRequest0.setNetworkParams((Map<String, String>) null); + Map<String, String> map0 = updateNetworkRequest0.getNetworkParams(); + assertNull(map0); + } + + @Test(timeout = 4000) + public void test40() throws Throwable { + UpdateNetworkRequest updateNetworkRequest0 = new UpdateNetworkRequest(); + updateNetworkRequest0.setNetworkType(""); + String string0 = updateNetworkRequest0.getNetworkType(); + assertEquals("", string0); + } +} |