From 025301d08b061482c1f046d562bf017c8cbcfe8d Mon Sep 17 00:00:00 2001 From: ChrisC Date: Tue, 31 Jan 2017 11:40:03 +0100 Subject: Initial OpenECOMP MSO commit Change-Id: Ia6a7574859480717402cc2f22534d9973a78fa6d Signed-off-by: ChrisC --- adapters/mso-vnf-adapter-async-client/README.md | 0 .../WebContent/META-INF/MANIFEST.MF | 3 + adapters/mso-vnf-adapter-async-client/pom.xml | 90 +++++++++ .../src/main/resources/VnfAdapterNotify.wsdl | 218 ++++++++++++++++++++ .../async/client/CreateVnfNotificationESTest.java | 225 +++++++++++++++++++++ .../CreateVnfNotificationESTestscaffolding.java | 83 ++++++++ .../async/client/DeleteVnfNotificationESTest.java | 109 ++++++++++ .../DeleteVnfNotificationESTestscaffolding.java | 79 ++++++++ .../async/client/MsoExceptionCategoryESTest.java | 97 +++++++++ .../MsoExceptionCategoryESTestscaffolding.java | 83 ++++++++ .../vnf/async/client/MsoRequestESTest.java | 70 +++++++ .../async/client/MsoRequestESTestscaffolding.java | 78 +++++++ .../vnf/async/client/ObjectFactoryESTest.java | 142 +++++++++++++ .../client/ObjectFactoryESTestscaffolding.java | 98 +++++++++ .../async/client/QueryVnfNotificationESTest.java | 224 ++++++++++++++++++++ .../QueryVnfNotificationESTestscaffolding.java | 82 ++++++++ .../client/RollbackVnfNotificationESTest.java | 100 +++++++++ .../RollbackVnfNotificationESTestscaffolding.java | 79 ++++++++ .../async/client/UpdateVnfNotificationESTest.java | 181 +++++++++++++++++ .../UpdateVnfNotificationESTestscaffolding.java | 83 ++++++++ .../vnf/async/client/VnfRollbackESTest.java | 132 ++++++++++++ .../async/client/VnfRollbackESTestscaffolding.java | 79 ++++++++ .../adapters/vnf/async/client/VnfStatusESTest.java | 91 +++++++++ .../async/client/VnfStatusESTestscaffolding.java | 83 ++++++++ 24 files changed, 2509 insertions(+) create mode 100644 adapters/mso-vnf-adapter-async-client/README.md create mode 100644 adapters/mso-vnf-adapter-async-client/WebContent/META-INF/MANIFEST.MF create mode 100644 adapters/mso-vnf-adapter-async-client/pom.xml create mode 100644 adapters/mso-vnf-adapter-async-client/src/main/resources/VnfAdapterNotify.wsdl create mode 100644 adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/CreateVnfNotificationESTest.java create mode 100644 adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/CreateVnfNotificationESTestscaffolding.java create mode 100644 adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/DeleteVnfNotificationESTest.java create mode 100644 adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/DeleteVnfNotificationESTestscaffolding.java create mode 100644 adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/MsoExceptionCategoryESTest.java create mode 100644 adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/MsoExceptionCategoryESTestscaffolding.java create mode 100644 adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/MsoRequestESTest.java create mode 100644 adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/MsoRequestESTestscaffolding.java create mode 100644 adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/ObjectFactoryESTest.java create mode 100644 adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/ObjectFactoryESTestscaffolding.java create mode 100644 adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/QueryVnfNotificationESTest.java create mode 100644 adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/QueryVnfNotificationESTestscaffolding.java create mode 100644 adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/RollbackVnfNotificationESTest.java create mode 100644 adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/RollbackVnfNotificationESTestscaffolding.java create mode 100644 adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/UpdateVnfNotificationESTest.java create mode 100644 adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/UpdateVnfNotificationESTestscaffolding.java create mode 100644 adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfRollbackESTest.java create mode 100644 adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfRollbackESTestscaffolding.java create mode 100644 adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfStatusESTest.java create mode 100644 adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfStatusESTestscaffolding.java (limited to 'adapters/mso-vnf-adapter-async-client') diff --git a/adapters/mso-vnf-adapter-async-client/README.md b/adapters/mso-vnf-adapter-async-client/README.md new file mode 100644 index 0000000..e69de29 diff --git a/adapters/mso-vnf-adapter-async-client/WebContent/META-INF/MANIFEST.MF b/adapters/mso-vnf-adapter-async-client/WebContent/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/adapters/mso-vnf-adapter-async-client/WebContent/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/adapters/mso-vnf-adapter-async-client/pom.xml b/adapters/mso-vnf-adapter-async-client/pom.xml new file mode 100644 index 0000000..fc10f1c --- /dev/null +++ b/adapters/mso-vnf-adapter-async-client/pom.xml @@ -0,0 +1,90 @@ + + 4.0.0 + + org.openecomp.mso + adapters + 0.0.4-SNAPSHOT + + org.openecomp.mso.adapters + mso-vnf-adapter-async-client + jar + mso-vnf-adapter-async-client + MSO VNF Adapter Async Client + + + ${project.artifactId}-${project.version} + + + maven-jar-plugin + 2.6 + + target/classes + + + + org.jvnet.jax-ws-commons + jaxws-maven-plugin + 2.3 + + + generate-stubs + process-classes + + wsimport + + + + -Djavax.xml.accessExternalSchema=all + + src/main/resources + + VnfAdapterNotify.wsdl + + /VnfAdapterNotify.wsdl + org.openecomp.mso.adapters.vnf.async.client + false + true + + + + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + + org.jvnet.jax-ws-commons + + + jaxws-maven-plugin + + + [2.3,) + + + wsimport + + + + + + + + + + + + + + diff --git a/adapters/mso-vnf-adapter-async-client/src/main/resources/VnfAdapterNotify.wsdl b/adapters/mso-vnf-adapter-async-client/src/main/resources/VnfAdapterNotify.wsdl new file mode 100644 index 0000000..aecef0d --- /dev/null +++ b/adapters/mso-vnf-adapter-async-client/src/main/resources/VnfAdapterNotify.wsdl @@ -0,0 +1,218 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/CreateVnfNotificationESTest.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/CreateVnfNotificationESTest.java new file mode 100644 index 0000000..bd72cac --- /dev/null +++ b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/CreateVnfNotificationESTest.java @@ -0,0 +1,225 @@ +/* + * This file was automatically generated by EvoSuite + * Mon Nov 14 10:47:44 GMT 2016 + */ + +package org.openecomp.mso.adapters.vnf.async.client; + +import org.junit.Test; +import static org.junit.Assert.*; + +import java.util.List; +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 CreateVnfNotificationESTest extends CreateVnfNotificationESTestscaffolding { + + @Test(timeout = 4000) + public void test00() throws Throwable { + CreateVnfNotification createVnfNotification0 = new CreateVnfNotification(); + createVnfNotification0.completed = true; + boolean boolean0 = createVnfNotification0.isCompleted(); + assertTrue(boolean0); + } + + @Test(timeout = 4000) + public void test01() throws Throwable { + CreateVnfNotification createVnfNotification0 = new CreateVnfNotification(); + createVnfNotification0.vnfId = "hxb7d^"; + String string0 = createVnfNotification0.getVnfId(); + assertEquals("hxb7d^", string0); + } + + @Test(timeout = 4000) + public void test02() throws Throwable { + CreateVnfNotification createVnfNotification0 = new CreateVnfNotification(); + createVnfNotification0.vnfId = ""; + String string0 = createVnfNotification0.getVnfId(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test03() throws Throwable { + CreateVnfNotification createVnfNotification0 = new CreateVnfNotification(); + VnfRollback vnfRollback0 = new VnfRollback(); + vnfRollback0.setVnfCreated(true); + createVnfNotification0.setRollback(vnfRollback0); + VnfRollback vnfRollback1 = createVnfNotification0.getRollback(); + assertSame(vnfRollback1, vnfRollback0); + } + + @Test(timeout = 4000) + public void test04() throws Throwable { + CreateVnfNotification createVnfNotification0 = new CreateVnfNotification(); + VnfRollback vnfRollback0 = new VnfRollback(); + createVnfNotification0.rollback = vnfRollback0; + VnfRollback vnfRollback1 = createVnfNotification0.getRollback(); + assertFalse(vnfRollback1.isVnfCreated()); + } + + @Test(timeout = 4000) + public void test05() throws Throwable { + CreateVnfNotification createVnfNotification0 = new CreateVnfNotification(); + CreateVnfNotification.Outputs createVnfNotification_Outputs0 = new CreateVnfNotification.Outputs(); + createVnfNotification0.outputs = createVnfNotification_Outputs0; + CreateVnfNotification.Outputs createVnfNotification_Outputs1 = createVnfNotification0.getOutputs(); + assertSame(createVnfNotification_Outputs1, createVnfNotification_Outputs0); + } + + @Test(timeout = 4000) + public void test06() throws Throwable { + CreateVnfNotification createVnfNotification0 = new CreateVnfNotification(); + createVnfNotification0.messageId = "org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory"; + String string0 = createVnfNotification0.getMessageId(); + assertEquals("org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory", string0); + } + + @Test(timeout = 4000) + public void test07() throws Throwable { + CreateVnfNotification createVnfNotification0 = new CreateVnfNotification(); + MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK; + createVnfNotification0.exception = msoExceptionCategory0; + MsoExceptionCategory msoExceptionCategory1 = createVnfNotification0.getException(); + assertEquals(MsoExceptionCategory.OPENSTACK, msoExceptionCategory1); + } + + @Test(timeout = 4000) + public void test08() throws Throwable { + CreateVnfNotification createVnfNotification0 = new CreateVnfNotification(); + createVnfNotification0.errorMessage = "=(,wm"; + String string0 = createVnfNotification0.getErrorMessage(); + assertEquals("=(,wm", string0); + } + + @Test(timeout = 4000) + public void test09() throws Throwable { + CreateVnfNotification.Outputs createVnfNotification_Outputs0 = new CreateVnfNotification.Outputs(); + createVnfNotification_Outputs0.getEntry(); + List list0 = createVnfNotification_Outputs0.getEntry(); + assertTrue(list0.isEmpty()); + } + + @Test(timeout = 4000) + public void test10() throws Throwable { + CreateVnfNotification createVnfNotification0 = new CreateVnfNotification(); + CreateVnfNotification.Outputs createVnfNotification_Outputs0 = new CreateVnfNotification.Outputs(); + createVnfNotification0.setOutputs(createVnfNotification_Outputs0); + assertNull(createVnfNotification0.getErrorMessage()); + } + + @Test(timeout = 4000) + public void test11() throws Throwable { + CreateVnfNotification createVnfNotification0 = new CreateVnfNotification(); + VnfRollback vnfRollback0 = createVnfNotification0.getRollback(); + assertNull(vnfRollback0); + } + + @Test(timeout = 4000) + public void test12() throws Throwable { + CreateVnfNotification createVnfNotification0 = new CreateVnfNotification(); + MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.OPENSTACK; + createVnfNotification0.setException(msoExceptionCategory0); + assertFalse(createVnfNotification0.isCompleted()); + } + + @Test(timeout = 4000) + public void test13() throws Throwable { + CreateVnfNotification createVnfNotification0 = new CreateVnfNotification(); + String string0 = createVnfNotification0.getErrorMessage(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test14() throws Throwable { + CreateVnfNotification createVnfNotification0 = new CreateVnfNotification(); + CreateVnfNotification.Outputs createVnfNotification_Outputs0 = createVnfNotification0.getOutputs(); + assertNull(createVnfNotification_Outputs0); + } + + @Test(timeout = 4000) + public void test15() throws Throwable { + CreateVnfNotification createVnfNotification0 = new CreateVnfNotification(); + createVnfNotification0.getException(); + } + + @Test(timeout = 4000) + public void test16() throws Throwable { + CreateVnfNotification createVnfNotification0 = new CreateVnfNotification(); + createVnfNotification0.setCompleted(false); + assertFalse(createVnfNotification0.isCompleted()); + } + + @Test(timeout = 4000) + public void test17() throws Throwable { + CreateVnfNotification createVnfNotification0 = new CreateVnfNotification(); + String string0 = createVnfNotification0.getMessageId(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test18() throws Throwable { + CreateVnfNotification createVnfNotification0 = new CreateVnfNotification(); + createVnfNotification0.setVnfId("N"); + assertNull(createVnfNotification0.getException()); + } + + @Test(timeout = 4000) + public void test19() throws Throwable { + CreateVnfNotification createVnfNotification0 = new CreateVnfNotification(); + createVnfNotification0.setErrorMessage(""); + String string0 = createVnfNotification0.getErrorMessage(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test20() throws Throwable { + CreateVnfNotification createVnfNotification0 = new CreateVnfNotification(); + String string0 = createVnfNotification0.getVnfId(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test21() throws Throwable { + CreateVnfNotification createVnfNotification0 = new CreateVnfNotification(); + createVnfNotification0.setMessageId(""); + String string0 = createVnfNotification0.getMessageId(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test22() throws Throwable { + CreateVnfNotification createVnfNotification0 = new CreateVnfNotification(); + boolean boolean0 = createVnfNotification0.isCompleted(); + assertFalse(boolean0); + } + + @Test(timeout = 4000) + public void test23() throws Throwable { + CreateVnfNotification.Outputs.Entry createVnfNotification_Outputs_Entry0 = new CreateVnfNotification.Outputs.Entry(); + createVnfNotification_Outputs_Entry0.setValue("`)_fe1"); + assertNull(createVnfNotification_Outputs_Entry0.getKey()); + } + + @Test(timeout = 4000) + public void test24() throws Throwable { + CreateVnfNotification.Outputs.Entry createVnfNotification_Outputs_Entry0 = new CreateVnfNotification.Outputs.Entry(); + createVnfNotification_Outputs_Entry0.setKey(""); + assertEquals("", createVnfNotification_Outputs_Entry0.getKey()); + } + + @Test(timeout = 4000) + public void test25() throws Throwable { + CreateVnfNotification.Outputs.Entry createVnfNotification_Outputs_Entry0 = new CreateVnfNotification.Outputs.Entry(); + String string0 = createVnfNotification_Outputs_Entry0.getValue(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test26() throws Throwable { + CreateVnfNotification.Outputs.Entry createVnfNotification_Outputs_Entry0 = new CreateVnfNotification.Outputs.Entry(); + String string0 = createVnfNotification_Outputs_Entry0.getKey(); + assertNull(string0); + } +} diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/CreateVnfNotificationESTestscaffolding.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/CreateVnfNotificationESTestscaffolding.java new file mode 100644 index 0000000..ff2e368 --- /dev/null +++ b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/CreateVnfNotificationESTestscaffolding.java @@ -0,0 +1,83 @@ +/** + * Scaffolding file used to store all the setups needed to run + * tests automatically generated by EvoSuite + * Mon Nov 14 10:47:44 GMT 2016 + */ + +package org.openecomp.mso.adapters.vnf.async.client; + +import org.evosuite.runtime.annotation.EvoSuiteClassExclude; +import org.junit.BeforeClass; +import org.junit.Before; +import org.junit.After; +import org.junit.AfterClass; +import org.evosuite.runtime.sandbox.Sandbox; + +@EvoSuiteClassExclude +public class CreateVnfNotificationESTestscaffolding { + + @org.junit.Rule + public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); + + private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); + + private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); + + @BeforeClass + public static void initEvoSuiteFramework() { + org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnf.async.client.CreateVnfNotification"; + org.evosuite.runtime.GuiSupport.initialize(); + org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; + org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; + org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; + org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; + org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); + org.evosuite.runtime.classhandling.JDKClassResetter.init(); + initializeClasses(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + } + + @AfterClass + public static void clearEvoSuiteFramework(){ + Sandbox.resetDefaultSecurityManager(); + java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); + } + + @Before + public void initTestCase(){ + threadStopper.storeCurrentThreads(); + threadStopper.startRecordingTime(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); + org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); + + org.evosuite.runtime.GuiSupport.setHeadless(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + org.evosuite.runtime.agent.InstrumentingAgent.activate(); + } + + @After + public void doneWithTestCase(){ + threadStopper.killAndJoinClientThreads(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); + org.evosuite.runtime.classhandling.JDKClassResetter.reset(); + resetClasses(); + org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); + org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); + org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); + } + + + private static void initializeClasses() { + org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(CreateVnfNotificationESTestscaffolding.class.getClassLoader() , + "org.openecomp.mso.adapters.vnf.async.client.CreateVnfNotification$Outputs$Entry", + "org.openecomp.mso.adapters.vnf.async.client.MsoRequest", + "org.openecomp.mso.adapters.vnf.async.client.CreateVnfNotification", + "org.openecomp.mso.adapters.vnf.async.client.CreateVnfNotification$Outputs", + "org.openecomp.mso.adapters.vnf.async.client.VnfRollback", + "org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory" + ); + } + + private static void resetClasses() { + } +} diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/DeleteVnfNotificationESTest.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/DeleteVnfNotificationESTest.java new file mode 100644 index 0000000..0d42b35 --- /dev/null +++ b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/DeleteVnfNotificationESTest.java @@ -0,0 +1,109 @@ +/* + * This file was automatically generated by EvoSuite + * Mon Nov 14 10:48:02 GMT 2016 + */ + +package org.openecomp.mso.adapters.vnf.async.client; + +import org.junit.Test; +import static org.junit.Assert.*; + +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 DeleteVnfNotificationESTest extends DeleteVnfNotificationESTestscaffolding { + + @Test(timeout = 4000) + public void test00() throws Throwable { + DeleteVnfNotification deleteVnfNotification0 = new DeleteVnfNotification(); + deleteVnfNotification0.setCompleted(true); + boolean boolean0 = deleteVnfNotification0.isCompleted(); + assertTrue(boolean0); + } + + @Test(timeout = 4000) + public void test01() throws Throwable { + DeleteVnfNotification deleteVnfNotification0 = new DeleteVnfNotification(); + deleteVnfNotification0.messageId = "H\"7~I/-7S["; + String string0 = deleteVnfNotification0.getMessageId(); + assertEquals("H\"7~I/-7S[", string0); + } + + @Test(timeout = 4000) + public void test02() throws Throwable { + DeleteVnfNotification deleteVnfNotification0 = new DeleteVnfNotification(); + deleteVnfNotification0.messageId = ""; + String string0 = deleteVnfNotification0.getMessageId(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test03() throws Throwable { + DeleteVnfNotification deleteVnfNotification0 = new DeleteVnfNotification(); + MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.USERDATA; + deleteVnfNotification0.exception = msoExceptionCategory0; + MsoExceptionCategory msoExceptionCategory1 = deleteVnfNotification0.getException(); + assertEquals(MsoExceptionCategory.USERDATA, msoExceptionCategory1); + } + + @Test(timeout = 4000) + public void test04() throws Throwable { + DeleteVnfNotification deleteVnfNotification0 = new DeleteVnfNotification(); + deleteVnfNotification0.errorMessage = ""; + deleteVnfNotification0.errorMessage = "H\"7~I/-7S["; + String string0 = deleteVnfNotification0.getErrorMessage(); + assertEquals("H\"7~I/-7S[", string0); + } + + @Test(timeout = 4000) + public void test05() throws Throwable { + DeleteVnfNotification deleteVnfNotification0 = new DeleteVnfNotification(); + deleteVnfNotification0.setErrorMessage(""); + String string0 = deleteVnfNotification0.getErrorMessage(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test06() throws Throwable { + DeleteVnfNotification deleteVnfNotification0 = new DeleteVnfNotification(); + boolean boolean0 = deleteVnfNotification0.isCompleted(); + assertFalse(boolean0); + } + + @Test(timeout = 4000) + public void test07() throws Throwable { + DeleteVnfNotification deleteVnfNotification0 = new DeleteVnfNotification(); + deleteVnfNotification0.getException(); + } + + @Test(timeout = 4000) + public void test08() throws Throwable { + DeleteVnfNotification deleteVnfNotification0 = new DeleteVnfNotification(); + String string0 = deleteVnfNotification0.getErrorMessage(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test09() throws Throwable { + DeleteVnfNotification deleteVnfNotification0 = new DeleteVnfNotification(); + String string0 = deleteVnfNotification0.getMessageId(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test10() throws Throwable { + DeleteVnfNotification deleteVnfNotification0 = new DeleteVnfNotification(); + deleteVnfNotification0.setMessageId("Jl^?zBSSPj jAXBElement0 = objectFactory0.createUpdateVnfNotification(updateVnfNotification0); + assertNotNull(jAXBElement0); + } + + @Test(timeout = 4000) + public void test02() throws Throwable { + ObjectFactory objectFactory0 = new ObjectFactory(); + QueryVnfNotification queryVnfNotification0 = objectFactory0.createQueryVnfNotification(); + assertNull(queryVnfNotification0.getException()); + } + + @Test(timeout = 4000) + public void test03() throws Throwable { + ObjectFactory objectFactory0 = new ObjectFactory(); + MsoRequest msoRequest0 = objectFactory0.createMsoRequest(); + assertNull(msoRequest0.getServiceInstanceId()); + } + + @Test(timeout = 4000) + public void test04() throws Throwable { + ObjectFactory objectFactory0 = new ObjectFactory(); + CreateVnfNotification createVnfNotification0 = new CreateVnfNotification(); + JAXBElement jAXBElement0 = objectFactory0.createCreateVnfNotification(createVnfNotification0); + assertNotNull(jAXBElement0); + } + + @Test(timeout = 4000) + public void test05() throws Throwable { + ObjectFactory objectFactory0 = new ObjectFactory(); + VnfRollback vnfRollback0 = objectFactory0.createVnfRollback(); + assertNull(vnfRollback0.getTenantId()); + } + + @Test(timeout = 4000) + public void test06() throws Throwable { + ObjectFactory objectFactory0 = new ObjectFactory(); + DeleteVnfNotification deleteVnfNotification0 = new DeleteVnfNotification(); + JAXBElement jAXBElement0 = objectFactory0.createDeleteVnfNotification(deleteVnfNotification0); + assertNotNull(jAXBElement0); + } + + @Test(timeout = 4000) + public void test07() throws Throwable { + ObjectFactory objectFactory0 = new ObjectFactory(); + UpdateVnfNotification.Outputs.Entry updateVnfNotification_Outputs_Entry0 = objectFactory0.createUpdateVnfNotificationOutputsEntry(); + assertNull(updateVnfNotification_Outputs_Entry0.getValue()); + } + + @Test(timeout = 4000) + public void test08() throws Throwable { + ObjectFactory objectFactory0 = new ObjectFactory(); + CreateVnfNotification.Outputs createVnfNotification_Outputs0 = objectFactory0.createCreateVnfNotificationOutputs(); + assertNotNull(createVnfNotification_Outputs0); + } + + @Test(timeout = 4000) + public void test09() throws Throwable { + ObjectFactory objectFactory0 = new ObjectFactory(); + UpdateVnfNotification updateVnfNotification0 = objectFactory0.createUpdateVnfNotification(); + assertNull(updateVnfNotification0.getMessageId()); + } + + @Test(timeout = 4000) + public void test10() throws Throwable { + ObjectFactory objectFactory0 = new ObjectFactory(); + UpdateVnfNotification.Outputs updateVnfNotification_Outputs0 = objectFactory0.createUpdateVnfNotificationOutputs(); + assertNotNull(updateVnfNotification_Outputs0); + } + + @Test(timeout = 4000) + public void test11() throws Throwable { + ObjectFactory objectFactory0 = new ObjectFactory(); + CreateVnfNotification.Outputs.Entry createVnfNotification_Outputs_Entry0 = objectFactory0.createCreateVnfNotificationOutputsEntry(); + assertNull(createVnfNotification_Outputs_Entry0.getKey()); + } + + @Test(timeout = 4000) + public void test12() throws Throwable { + ObjectFactory objectFactory0 = new ObjectFactory(); + DeleteVnfNotification deleteVnfNotification0 = objectFactory0.createDeleteVnfNotification(); + assertNull(deleteVnfNotification0.getErrorMessage()); + } + + @Test(timeout = 4000) + public void test13() throws Throwable { + ObjectFactory objectFactory0 = new ObjectFactory(); + QueryVnfNotification.Outputs queryVnfNotification_Outputs0 = objectFactory0.createQueryVnfNotificationOutputs(); + assertNotNull(queryVnfNotification_Outputs0); + } + + @Test(timeout = 4000) + public void test14() throws Throwable { + ObjectFactory objectFactory0 = new ObjectFactory(); + RollbackVnfNotification rollbackVnfNotification0 = objectFactory0.createRollbackVnfNotification(); + JAXBElement jAXBElement0 = objectFactory0.createRollbackVnfNotification(rollbackVnfNotification0); + assertNotNull(jAXBElement0); + } + + @Test(timeout = 4000) + public void test15() throws Throwable { + ObjectFactory objectFactory0 = new ObjectFactory(); + QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification(); + JAXBElement jAXBElement0 = objectFactory0.createQueryVnfNotification(queryVnfNotification0); + assertNotNull(jAXBElement0); + } + + @Test(timeout = 4000) + public void test16() throws Throwable { + ObjectFactory objectFactory0 = new ObjectFactory(); + QueryVnfNotification.Outputs.Entry queryVnfNotification_Outputs_Entry0 = objectFactory0.createQueryVnfNotificationOutputsEntry(); + assertNull(queryVnfNotification_Outputs_Entry0.getValue()); + } +} diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/ObjectFactoryESTestscaffolding.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/ObjectFactoryESTestscaffolding.java new file mode 100644 index 0000000..4482069 --- /dev/null +++ b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/ObjectFactoryESTestscaffolding.java @@ -0,0 +1,98 @@ +/** + * Scaffolding file used to store all the setups needed to run + * tests automatically generated by EvoSuite + * Mon Nov 14 10:50:08 GMT 2016 + */ + +package org.openecomp.mso.adapters.vnf.async.client; + +import org.evosuite.runtime.annotation.EvoSuiteClassExclude; +import org.junit.BeforeClass; +import org.junit.Before; +import org.junit.After; +import org.junit.AfterClass; +import org.evosuite.runtime.sandbox.Sandbox; + +@EvoSuiteClassExclude +public class ObjectFactoryESTestscaffolding { + + @org.junit.Rule + public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); + + private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); + + private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); + + @BeforeClass + public static void initEvoSuiteFramework() { + org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnf.async.client.ObjectFactory"; + org.evosuite.runtime.GuiSupport.initialize(); + org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; + org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; + org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; + org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; + org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); + org.evosuite.runtime.classhandling.JDKClassResetter.init(); + initializeClasses(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + } + + @AfterClass + public static void clearEvoSuiteFramework(){ + Sandbox.resetDefaultSecurityManager(); + java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); + } + + @Before + public void initTestCase(){ + threadStopper.storeCurrentThreads(); + threadStopper.startRecordingTime(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); + org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); + + org.evosuite.runtime.GuiSupport.setHeadless(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + org.evosuite.runtime.agent.InstrumentingAgent.activate(); + } + + @After + public void doneWithTestCase(){ + threadStopper.killAndJoinClientThreads(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); + org.evosuite.runtime.classhandling.JDKClassResetter.reset(); + resetClasses(); + org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); + org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); + org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); + } + + + private static void initializeClasses() { + org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ObjectFactoryESTestscaffolding.class.getClassLoader() , + "org.openecomp.mso.adapters.vnf.async.client.MsoRequest", + "org.openecomp.mso.adapters.vnf.async.client.RollbackVnfNotification", + "org.openecomp.mso.adapters.vnf.async.client.QueryVnfNotification$Outputs$Entry", + "org.openecomp.mso.adapters.vnf.async.client.UpdateVnfNotification$Outputs$Entry", + "org.openecomp.mso.adapters.vnf.async.client.CreateVnfNotification", + "org.openecomp.mso.adapters.vnf.async.client.DeleteVnfNotification", + "org.openecomp.mso.adapters.vnf.async.client.VnfStatus", + "org.openecomp.mso.adapters.vnf.async.client.CreateVnfNotification$Outputs", + "org.openecomp.mso.adapters.vnf.async.client.UpdateVnfNotification$Outputs", + "org.openecomp.mso.adapters.vnf.async.client.QueryVnfNotification", + "org.openecomp.mso.adapters.vnf.async.client.CreateVnfNotification$Outputs$Entry", + "org.openecomp.mso.adapters.vnf.async.client.QueryVnfNotification$Outputs", + "org.openecomp.mso.adapters.vnf.async.client.ObjectFactory", + "org.openecomp.mso.adapters.vnf.async.client.VnfRollback", + "org.openecomp.mso.adapters.vnf.async.client.UpdateVnfNotification", + "org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory" + ); + } + + private static void resetClasses() { + org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ObjectFactoryESTestscaffolding.class.getClassLoader()); + + org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( + "org.openecomp.mso.adapters.vnf.async.client.ObjectFactory" + ); + } +} diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/QueryVnfNotificationESTest.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/QueryVnfNotificationESTest.java new file mode 100644 index 0000000..f658251 --- /dev/null +++ b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/QueryVnfNotificationESTest.java @@ -0,0 +1,224 @@ +/* + * This file was automatically generated by EvoSuite + * Mon Nov 14 10:49:18 GMT 2016 + */ + +package org.openecomp.mso.adapters.vnf.async.client; + +import org.junit.Test; +import static org.junit.Assert.*; + +import java.util.List; +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 QueryVnfNotificationESTest extends QueryVnfNotificationESTestscaffolding { + + @Test(timeout = 4000) + public void test00() throws Throwable { + QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification(); + Boolean boolean0 = Boolean.valueOf("`97"); + queryVnfNotification0.setVnfExists(boolean0); + Boolean boolean1 = queryVnfNotification0.isVnfExists(); + assertFalse(boolean1); + } + + @Test(timeout = 4000) + public void test01() throws Throwable { + QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification(); + queryVnfNotification0.completed = true; + boolean boolean0 = queryVnfNotification0.isCompleted(); + assertTrue(boolean0); + } + + @Test(timeout = 4000) + public void test02() throws Throwable { + QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification(); + queryVnfNotification0.setVnfId(""); + String string0 = queryVnfNotification0.getVnfId(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test03() throws Throwable { + QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification(); + VnfStatus vnfStatus0 = VnfStatus.FAILED; + queryVnfNotification0.status = vnfStatus0; + VnfStatus vnfStatus1 = queryVnfNotification0.getStatus(); + assertSame(vnfStatus1, vnfStatus0); + } + + @Test(timeout = 4000) + public void test04() throws Throwable { + QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification(); + QueryVnfNotification.Outputs queryVnfNotification_Outputs0 = new QueryVnfNotification.Outputs(); + queryVnfNotification0.setOutputs(queryVnfNotification_Outputs0); + QueryVnfNotification.Outputs queryVnfNotification_Outputs1 = queryVnfNotification0.getOutputs(); + assertSame(queryVnfNotification_Outputs1, queryVnfNotification_Outputs0); + } + + @Test(timeout = 4000) + public void test05() throws Throwable { + QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification(); + queryVnfNotification0.messageId = "FAILED"; + String string0 = queryVnfNotification0.getMessageId(); + assertEquals("FAILED", string0); + } + + @Test(timeout = 4000) + public void test06() throws Throwable { + QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification(); + MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.INTERNAL; + queryVnfNotification0.setException(msoExceptionCategory0); + MsoExceptionCategory msoExceptionCategory1 = queryVnfNotification0.getException(); + assertEquals(MsoExceptionCategory.INTERNAL, msoExceptionCategory1); + } + + @Test(timeout = 4000) + public void test07() throws Throwable { + QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification(); + queryVnfNotification0.errorMessage = "Jk{*#{!k"; + String string0 = queryVnfNotification0.getErrorMessage(); + assertEquals("Jk{*#{!k", string0); + } + + @Test(timeout = 4000) + public void test08() throws Throwable { + QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification(); + String string0 = queryVnfNotification0.getMessageId(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test09() throws Throwable { + QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification(); + queryVnfNotification0.setMessageId(""); + String string0 = queryVnfNotification0.getMessageId(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test10() throws Throwable { + QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification(); + queryVnfNotification0.setCompleted(true); + assertTrue(queryVnfNotification0.isCompleted()); + } + + @Test(timeout = 4000) + public void test11() throws Throwable { + QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification(); + queryVnfNotification0.setVnfId("M:E`?t"); + String string0 = queryVnfNotification0.getVnfId(); + assertEquals("M:E`?t", string0); + } + + @Test(timeout = 4000) + public void test12() throws Throwable { + QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification(); + String string0 = queryVnfNotification0.getVnfId(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test13() throws Throwable { + QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification(); + boolean boolean0 = queryVnfNotification0.isCompleted(); + assertFalse(boolean0); + } + + @Test(timeout = 4000) + public void test14() throws Throwable { + QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification(); + queryVnfNotification0.getStatus(); + } + + @Test(timeout = 4000) + public void test15() throws Throwable { + QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification(); + queryVnfNotification0.setErrorMessage(""); + String string0 = queryVnfNotification0.getErrorMessage(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test16() throws Throwable { + QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification(); + VnfStatus vnfStatus0 = VnfStatus.NOTFOUND; + queryVnfNotification0.setStatus(vnfStatus0); + assertFalse(queryVnfNotification0.isCompleted()); + } + + @Test(timeout = 4000) + public void test17() throws Throwable { + QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification(); + Boolean boolean0 = queryVnfNotification0.isVnfExists(); + assertNull(boolean0); + } + + @Test(timeout = 4000) + public void test18() throws Throwable { + QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification(); + queryVnfNotification0.getException(); + } + + @Test(timeout = 4000) + public void test19() throws Throwable { + QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification(); + QueryVnfNotification.Outputs queryVnfNotification_Outputs0 = queryVnfNotification0.getOutputs(); + assertNull(queryVnfNotification_Outputs0); + } + + @Test(timeout = 4000) + public void test20() throws Throwable { + QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification(); + String string0 = queryVnfNotification0.getErrorMessage(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test21() throws Throwable { + QueryVnfNotification queryVnfNotification0 = new QueryVnfNotification(); + Boolean boolean0 = new Boolean(true); + queryVnfNotification0.setVnfExists(boolean0); + Boolean boolean1 = queryVnfNotification0.isVnfExists(); + assertTrue(boolean1); + } + + @Test(timeout = 4000) + public void test22() throws Throwable { + QueryVnfNotification.Outputs queryVnfNotification_Outputs0 = new QueryVnfNotification.Outputs(); + List list0 = queryVnfNotification_Outputs0.getEntry(); + List list1 = queryVnfNotification_Outputs0.getEntry(); + assertSame(list1, list0); + } + + @Test(timeout = 4000) + public void test23() throws Throwable { + QueryVnfNotification.Outputs.Entry queryVnfNotification_Outputs_Entry0 = new QueryVnfNotification.Outputs.Entry(); + String string0 = queryVnfNotification_Outputs_Entry0.getKey(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test24() throws Throwable { + QueryVnfNotification.Outputs.Entry queryVnfNotification_Outputs_Entry0 = new QueryVnfNotification.Outputs.Entry(); + queryVnfNotification_Outputs_Entry0.setValue("{[VrUC"); + assertNull(queryVnfNotification_Outputs_Entry0.getKey()); + } + + @Test(timeout = 4000) + public void test25() throws Throwable { + QueryVnfNotification.Outputs.Entry queryVnfNotification_Outputs_Entry0 = new QueryVnfNotification.Outputs.Entry(); + String string0 = queryVnfNotification_Outputs_Entry0.getValue(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test26() throws Throwable { + QueryVnfNotification.Outputs.Entry queryVnfNotification_Outputs_Entry0 = new QueryVnfNotification.Outputs.Entry(); + queryVnfNotification_Outputs_Entry0.setKey(""); + assertNull(queryVnfNotification_Outputs_Entry0.getValue()); + } +} diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/QueryVnfNotificationESTestscaffolding.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/QueryVnfNotificationESTestscaffolding.java new file mode 100644 index 0000000..1c1a774 --- /dev/null +++ b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/QueryVnfNotificationESTestscaffolding.java @@ -0,0 +1,82 @@ +/** + * Scaffolding file used to store all the setups needed to run + * tests automatically generated by EvoSuite + * Mon Nov 14 10:49:18 GMT 2016 + */ + +package org.openecomp.mso.adapters.vnf.async.client; + +import org.evosuite.runtime.annotation.EvoSuiteClassExclude; +import org.junit.BeforeClass; +import org.junit.Before; +import org.junit.After; +import org.junit.AfterClass; +import org.evosuite.runtime.sandbox.Sandbox; + +@EvoSuiteClassExclude +public class QueryVnfNotificationESTestscaffolding { + + @org.junit.Rule + public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); + + private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); + + private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); + + @BeforeClass + public static void initEvoSuiteFramework() { + org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnf.async.client.QueryVnfNotification"; + org.evosuite.runtime.GuiSupport.initialize(); + org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; + org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; + org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; + org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; + org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); + org.evosuite.runtime.classhandling.JDKClassResetter.init(); + initializeClasses(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + } + + @AfterClass + public static void clearEvoSuiteFramework(){ + Sandbox.resetDefaultSecurityManager(); + java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); + } + + @Before + public void initTestCase(){ + threadStopper.storeCurrentThreads(); + threadStopper.startRecordingTime(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); + org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); + + org.evosuite.runtime.GuiSupport.setHeadless(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + org.evosuite.runtime.agent.InstrumentingAgent.activate(); + } + + @After + public void doneWithTestCase(){ + threadStopper.killAndJoinClientThreads(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); + org.evosuite.runtime.classhandling.JDKClassResetter.reset(); + resetClasses(); + org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); + org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); + org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); + } + + + private static void initializeClasses() { + org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(QueryVnfNotificationESTestscaffolding.class.getClassLoader() , + "org.openecomp.mso.adapters.vnf.async.client.QueryVnfNotification$Outputs$Entry", + "org.openecomp.mso.adapters.vnf.async.client.VnfStatus", + "org.openecomp.mso.adapters.vnf.async.client.QueryVnfNotification$Outputs", + "org.openecomp.mso.adapters.vnf.async.client.QueryVnfNotification", + "org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory" + ); + } + + private static void resetClasses() { + } +} diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/RollbackVnfNotificationESTest.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/RollbackVnfNotificationESTest.java new file mode 100644 index 0000000..02203ac --- /dev/null +++ b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/RollbackVnfNotificationESTest.java @@ -0,0 +1,100 @@ +/* + * This file was automatically generated by EvoSuite + * Mon Nov 14 10:46:51 GMT 2016 + */ + +package org.openecomp.mso.adapters.vnf.async.client; + +import org.junit.Test; +import static org.junit.Assert.*; + +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 RollbackVnfNotificationESTest extends RollbackVnfNotificationESTestscaffolding { + + @Test(timeout = 4000) + public void test00() throws Throwable { + RollbackVnfNotification rollbackVnfNotification0 = new RollbackVnfNotification(); + rollbackVnfNotification0.setMessageId(":HW@8Kxo`M[S:7>"); + String string0 = rollbackVnfNotification0.getMessageId(); + assertNotNull(string0); + } + + @Test(timeout = 4000) + public void test01() throws Throwable { + RollbackVnfNotification rollbackVnfNotification0 = new RollbackVnfNotification(); + rollbackVnfNotification0.errorMessage = "INTERNAL"; + String string0 = rollbackVnfNotification0.getErrorMessage(); + assertEquals("INTERNAL", string0); + } + + @Test(timeout = 4000) + public void test02() throws Throwable { + RollbackVnfNotification rollbackVnfNotification0 = new RollbackVnfNotification(); + rollbackVnfNotification0.errorMessage = ""; + String string0 = rollbackVnfNotification0.getErrorMessage(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test03() throws Throwable { + RollbackVnfNotification rollbackVnfNotification0 = new RollbackVnfNotification(); + rollbackVnfNotification0.getException(); + } + + @Test(timeout = 4000) + public void test04() throws Throwable { + RollbackVnfNotification rollbackVnfNotification0 = new RollbackVnfNotification(); + rollbackVnfNotification0.setMessageId(""); + String string0 = rollbackVnfNotification0.getMessageId(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test05() throws Throwable { + RollbackVnfNotification rollbackVnfNotification0 = new RollbackVnfNotification(); + String string0 = rollbackVnfNotification0.getErrorMessage(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test06() throws Throwable { + RollbackVnfNotification rollbackVnfNotification0 = new RollbackVnfNotification(); + MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.INTERNAL; + rollbackVnfNotification0.setException(msoExceptionCategory0); + MsoExceptionCategory msoExceptionCategory1 = rollbackVnfNotification0.getException(); + assertSame(msoExceptionCategory1, msoExceptionCategory0); + } + + @Test(timeout = 4000) + public void test07() throws Throwable { + RollbackVnfNotification rollbackVnfNotification0 = new RollbackVnfNotification(); + rollbackVnfNotification0.setErrorMessage(""); + assertEquals("", rollbackVnfNotification0.getErrorMessage()); + } + + @Test(timeout = 4000) + public void test08() throws Throwable { + RollbackVnfNotification rollbackVnfNotification0 = new RollbackVnfNotification(); + String string0 = rollbackVnfNotification0.getMessageId(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test09() throws Throwable { + RollbackVnfNotification rollbackVnfNotification0 = new RollbackVnfNotification(); + boolean boolean0 = rollbackVnfNotification0.isCompleted(); + assertFalse(boolean0); + } + + @Test(timeout = 4000) + public void test10() throws Throwable { + RollbackVnfNotification rollbackVnfNotification0 = new RollbackVnfNotification(); + rollbackVnfNotification0.setCompleted(true); + boolean boolean0 = rollbackVnfNotification0.isCompleted(); + assertTrue(boolean0); + } +} diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/RollbackVnfNotificationESTestscaffolding.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/RollbackVnfNotificationESTestscaffolding.java new file mode 100644 index 0000000..8d91d5c --- /dev/null +++ b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/RollbackVnfNotificationESTestscaffolding.java @@ -0,0 +1,79 @@ +/** + * Scaffolding file used to store all the setups needed to run + * tests automatically generated by EvoSuite + * Mon Nov 14 10:46:51 GMT 2016 + */ + +package org.openecomp.mso.adapters.vnf.async.client; + +import org.evosuite.runtime.annotation.EvoSuiteClassExclude; +import org.junit.BeforeClass; +import org.junit.Before; +import org.junit.After; +import org.junit.AfterClass; +import org.evosuite.runtime.sandbox.Sandbox; + +@EvoSuiteClassExclude +public class RollbackVnfNotificationESTestscaffolding { + + @org.junit.Rule + public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); + + private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); + + private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); + + @BeforeClass + public static void initEvoSuiteFramework() { + org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnf.async.client.RollbackVnfNotification"; + org.evosuite.runtime.GuiSupport.initialize(); + org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; + org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; + org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; + org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; + org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); + org.evosuite.runtime.classhandling.JDKClassResetter.init(); + initializeClasses(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + } + + @AfterClass + public static void clearEvoSuiteFramework(){ + Sandbox.resetDefaultSecurityManager(); + java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); + } + + @Before + public void initTestCase(){ + threadStopper.storeCurrentThreads(); + threadStopper.startRecordingTime(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); + org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); + + org.evosuite.runtime.GuiSupport.setHeadless(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + org.evosuite.runtime.agent.InstrumentingAgent.activate(); + } + + @After + public void doneWithTestCase(){ + threadStopper.killAndJoinClientThreads(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); + org.evosuite.runtime.classhandling.JDKClassResetter.reset(); + resetClasses(); + org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); + org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); + org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); + } + + + private static void initializeClasses() { + org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RollbackVnfNotificationESTestscaffolding.class.getClassLoader() , + "org.openecomp.mso.adapters.vnf.async.client.RollbackVnfNotification", + "org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory" + ); + } + + private static void resetClasses() { + } +} diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/UpdateVnfNotificationESTest.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/UpdateVnfNotificationESTest.java new file mode 100644 index 0000000..e71d416 --- /dev/null +++ b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/UpdateVnfNotificationESTest.java @@ -0,0 +1,181 @@ +/* + * This file was automatically generated by EvoSuite + * Mon Nov 14 10:51:15 GMT 2016 + */ + +package org.openecomp.mso.adapters.vnf.async.client; + +import org.junit.Test; +import static org.junit.Assert.*; + +import java.util.List; +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 UpdateVnfNotificationESTest extends UpdateVnfNotificationESTestscaffolding { + + @Test(timeout = 4000) + public void test00() throws Throwable { + UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification(); + VnfRollback vnfRollback0 = new VnfRollback(); + vnfRollback0.tenantCreated = true; + updateVnfNotification0.setRollback(vnfRollback0); + VnfRollback vnfRollback1 = updateVnfNotification0.getRollback(); + assertNull(vnfRollback1.getTenantId()); + } + + @Test(timeout = 4000) + public void test01() throws Throwable { + UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification(); + VnfRollback vnfRollback0 = new VnfRollback(); + updateVnfNotification0.rollback = vnfRollback0; + VnfRollback vnfRollback1 = updateVnfNotification0.getRollback(); + assertFalse(vnfRollback1.isTenantCreated()); + } + + @Test(timeout = 4000) + public void test02() throws Throwable { + UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification(); + UpdateVnfNotification.Outputs updateVnfNotification_Outputs0 = new UpdateVnfNotification.Outputs(); + updateVnfNotification0.setOutputs(updateVnfNotification_Outputs0); + UpdateVnfNotification.Outputs updateVnfNotification_Outputs1 = updateVnfNotification0.getOutputs(); + assertSame(updateVnfNotification_Outputs1, updateVnfNotification_Outputs0); + } + + @Test(timeout = 4000) + public void test03() throws Throwable { + UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification(); + updateVnfNotification0.messageId = ":_rGAeg9'Jf17.p+,m"; + String string0 = updateVnfNotification0.getMessageId(); + assertEquals(":_rGAeg9'Jf17.p+,m", string0); + } + + @Test(timeout = 4000) + public void test04() throws Throwable { + UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification(); + updateVnfNotification0.setMessageId(""); + String string0 = updateVnfNotification0.getMessageId(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test05() throws Throwable { + UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification(); + MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.IO; + updateVnfNotification0.exception = msoExceptionCategory0; + MsoExceptionCategory msoExceptionCategory1 = updateVnfNotification0.getException(); + assertEquals(MsoExceptionCategory.IO, msoExceptionCategory1); + } + + @Test(timeout = 4000) + public void test06() throws Throwable { + UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification(); + updateVnfNotification0.errorMessage = null; + updateVnfNotification0.errorMessage = ""; + String string0 = updateVnfNotification0.getErrorMessage(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test07() throws Throwable { + UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification(); + VnfRollback vnfRollback0 = updateVnfNotification0.getRollback(); + assertNull(vnfRollback0); + } + + @Test(timeout = 4000) + public void test08() throws Throwable { + UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification(); + boolean boolean0 = updateVnfNotification0.isCompleted(); + assertFalse(boolean0); + } + + @Test(timeout = 4000) + public void test09() throws Throwable { + UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification(); + updateVnfNotification0.getException(); + } + + @Test(timeout = 4000) + public void test10() throws Throwable { + UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification(); + String string0 = updateVnfNotification0.getMessageId(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test11() throws Throwable { + UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification(); + MsoExceptionCategory msoExceptionCategory0 = MsoExceptionCategory.IO; + updateVnfNotification0.setException(msoExceptionCategory0); + assertEquals(MsoExceptionCategory.IO, updateVnfNotification0.getException()); + } + + @Test(timeout = 4000) + public void test12() throws Throwable { + UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification(); + updateVnfNotification0.setCompleted(true); + boolean boolean0 = updateVnfNotification0.isCompleted(); + assertTrue(boolean0); + } + + @Test(timeout = 4000) + public void test13() throws Throwable { + UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification(); + UpdateVnfNotification.Outputs updateVnfNotification_Outputs0 = updateVnfNotification0.getOutputs(); + assertNull(updateVnfNotification_Outputs0); + } + + @Test(timeout = 4000) + public void test14() throws Throwable { + UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification(); + updateVnfNotification0.setErrorMessage("m.m)#ZJF);)x*\"HQ8WB"); + String string0 = updateVnfNotification0.getErrorMessage(); + assertEquals("m.m)#ZJF);)x*\"HQ8WB", string0); + } + + @Test(timeout = 4000) + public void test15() throws Throwable { + UpdateVnfNotification updateVnfNotification0 = new UpdateVnfNotification(); + String string0 = updateVnfNotification0.getErrorMessage(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test16() throws Throwable { + UpdateVnfNotification.Outputs updateVnfNotification_Outputs0 = new UpdateVnfNotification.Outputs(); + List list0 = updateVnfNotification_Outputs0.getEntry(); + List list1 = updateVnfNotification_Outputs0.getEntry(); + assertSame(list1, list0); + } + + @Test(timeout = 4000) + public void test17() throws Throwable { + UpdateVnfNotification.Outputs.Entry updateVnfNotification_Outputs_Entry0 = new UpdateVnfNotification.Outputs.Entry(); + updateVnfNotification_Outputs_Entry0.setKey(","); + assertEquals(",", updateVnfNotification_Outputs_Entry0.getKey()); + } + + @Test(timeout = 4000) + public void test18() throws Throwable { + UpdateVnfNotification.Outputs.Entry updateVnfNotification_Outputs_Entry0 = new UpdateVnfNotification.Outputs.Entry(); + String string0 = updateVnfNotification_Outputs_Entry0.getValue(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test19() throws Throwable { + UpdateVnfNotification.Outputs.Entry updateVnfNotification_Outputs_Entry0 = new UpdateVnfNotification.Outputs.Entry(); + updateVnfNotification_Outputs_Entry0.setValue("IO"); + assertNull(updateVnfNotification_Outputs_Entry0.getKey()); + } + + @Test(timeout = 4000) + public void test20() throws Throwable { + UpdateVnfNotification.Outputs.Entry updateVnfNotification_Outputs_Entry0 = new UpdateVnfNotification.Outputs.Entry(); + String string0 = updateVnfNotification_Outputs_Entry0.getKey(); + assertNull(string0); + } +} diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/UpdateVnfNotificationESTestscaffolding.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/UpdateVnfNotificationESTestscaffolding.java new file mode 100644 index 0000000..6517163 --- /dev/null +++ b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/UpdateVnfNotificationESTestscaffolding.java @@ -0,0 +1,83 @@ +/** + * Scaffolding file used to store all the setups needed to run + * tests automatically generated by EvoSuite + * Mon Nov 14 10:51:15 GMT 2016 + */ + +package org.openecomp.mso.adapters.vnf.async.client; + +import org.evosuite.runtime.annotation.EvoSuiteClassExclude; +import org.junit.BeforeClass; +import org.junit.Before; +import org.junit.After; +import org.junit.AfterClass; +import org.evosuite.runtime.sandbox.Sandbox; + +@EvoSuiteClassExclude +public class UpdateVnfNotificationESTestscaffolding { + + @org.junit.Rule + public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); + + private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); + + private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); + + @BeforeClass + public static void initEvoSuiteFramework() { + org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnf.async.client.UpdateVnfNotification"; + org.evosuite.runtime.GuiSupport.initialize(); + org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; + org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; + org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; + org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; + org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); + org.evosuite.runtime.classhandling.JDKClassResetter.init(); + initializeClasses(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + } + + @AfterClass + public static void clearEvoSuiteFramework(){ + Sandbox.resetDefaultSecurityManager(); + java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); + } + + @Before + public void initTestCase(){ + threadStopper.storeCurrentThreads(); + threadStopper.startRecordingTime(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); + org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); + + org.evosuite.runtime.GuiSupport.setHeadless(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + org.evosuite.runtime.agent.InstrumentingAgent.activate(); + } + + @After + public void doneWithTestCase(){ + threadStopper.killAndJoinClientThreads(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); + org.evosuite.runtime.classhandling.JDKClassResetter.reset(); + resetClasses(); + org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); + org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); + org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); + } + + + private static void initializeClasses() { + org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(UpdateVnfNotificationESTestscaffolding.class.getClassLoader() , + "org.openecomp.mso.adapters.vnf.async.client.MsoRequest", + "org.openecomp.mso.adapters.vnf.async.client.UpdateVnfNotification$Outputs$Entry", + "org.openecomp.mso.adapters.vnf.async.client.UpdateVnfNotification$Outputs", + "org.openecomp.mso.adapters.vnf.async.client.VnfRollback", + "org.openecomp.mso.adapters.vnf.async.client.UpdateVnfNotification", + "org.openecomp.mso.adapters.vnf.async.client.MsoExceptionCategory" + ); + } + + private static void resetClasses() { + } +} diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfRollbackESTest.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfRollbackESTest.java new file mode 100644 index 0000000..7ac55f0 --- /dev/null +++ b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfRollbackESTest.java @@ -0,0 +1,132 @@ +/* + * This file was automatically generated by EvoSuite + * Mon Nov 14 10:50:26 GMT 2016 + */ + +package org.openecomp.mso.adapters.vnf.async.client; + +import org.junit.Test; +import static org.junit.Assert.*; + +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 VnfRollbackESTest extends VnfRollbackESTestscaffolding { + + @Test(timeout = 4000) + public void test00() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback(); + vnfRollback0.setVnfId("12&$HOD'rH:!tJy"); + String string0 = vnfRollback0.getVnfId(); + assertEquals("12&$HOD'rH:!tJy", string0); + } + + @Test(timeout = 4000) + public void test01() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback(); + vnfRollback0.vnfId = ""; + String string0 = vnfRollback0.getVnfId(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test02() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback(); + vnfRollback0.tenantId = "=x@lXzB:nqB-5F9"; + String string0 = vnfRollback0.getTenantId(); + assertEquals("=x@lXzB:nqB-5F9", string0); + } + + @Test(timeout = 4000) + public void test03() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback(); + MsoRequest msoRequest0 = new MsoRequest(); + vnfRollback0.setMsoRequest(msoRequest0); + MsoRequest msoRequest1 = vnfRollback0.getMsoRequest(); + assertNull(msoRequest1.getServiceInstanceId()); + } + + @Test(timeout = 4000) + public void test04() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback(); + vnfRollback0.setCloudSiteId("/8Qc+9]"); + String string0 = vnfRollback0.getCloudSiteId(); + assertEquals("/8Qc+9]", string0); + } + + @Test(timeout = 4000) + public void test05() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback(); + vnfRollback0.setTenantCreated(true); + boolean boolean0 = vnfRollback0.isTenantCreated(); + assertTrue(boolean0); + } + + @Test(timeout = 4000) + public void test06() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback(); + boolean boolean0 = vnfRollback0.isTenantCreated(); + assertFalse(boolean0); + } + + @Test(timeout = 4000) + public void test07() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback(); + String string0 = vnfRollback0.getVnfId(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test08() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback(); + MsoRequest msoRequest0 = vnfRollback0.getMsoRequest(); + assertNull(msoRequest0); + } + + @Test(timeout = 4000) + public void test09() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback(); + vnfRollback0.setVnfCreated(true); + boolean boolean0 = vnfRollback0.isVnfCreated(); + assertTrue(boolean0); + } + + @Test(timeout = 4000) + public void test10() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback(); + boolean boolean0 = vnfRollback0.isVnfCreated(); + assertFalse(boolean0); + } + + @Test(timeout = 4000) + public void test11() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback(); + vnfRollback0.setCloudSiteId(""); + String string0 = vnfRollback0.getCloudSiteId(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test12() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback(); + vnfRollback0.setTenantId(""); + String string0 = vnfRollback0.getTenantId(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test13() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback(); + String string0 = vnfRollback0.getCloudSiteId(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test14() throws Throwable { + VnfRollback vnfRollback0 = new VnfRollback(); + String string0 = vnfRollback0.getTenantId(); + assertNull(string0); + } +} diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfRollbackESTestscaffolding.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfRollbackESTestscaffolding.java new file mode 100644 index 0000000..10defa4 --- /dev/null +++ b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfRollbackESTestscaffolding.java @@ -0,0 +1,79 @@ +/** + * Scaffolding file used to store all the setups needed to run + * tests automatically generated by EvoSuite + * Mon Nov 14 10:50:26 GMT 2016 + */ + +package org.openecomp.mso.adapters.vnf.async.client; + +import org.evosuite.runtime.annotation.EvoSuiteClassExclude; +import org.junit.BeforeClass; +import org.junit.Before; +import org.junit.After; +import org.junit.AfterClass; +import org.evosuite.runtime.sandbox.Sandbox; + +@EvoSuiteClassExclude +public class VnfRollbackESTestscaffolding { + + @org.junit.Rule + public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); + + private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); + + private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); + + @BeforeClass + public static void initEvoSuiteFramework() { + org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnf.async.client.VnfRollback"; + org.evosuite.runtime.GuiSupport.initialize(); + org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; + org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; + org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; + org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; + org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); + org.evosuite.runtime.classhandling.JDKClassResetter.init(); + initializeClasses(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + } + + @AfterClass + public static void clearEvoSuiteFramework(){ + Sandbox.resetDefaultSecurityManager(); + java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); + } + + @Before + public void initTestCase(){ + threadStopper.storeCurrentThreads(); + threadStopper.startRecordingTime(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); + org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); + + org.evosuite.runtime.GuiSupport.setHeadless(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + org.evosuite.runtime.agent.InstrumentingAgent.activate(); + } + + @After + public void doneWithTestCase(){ + threadStopper.killAndJoinClientThreads(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); + org.evosuite.runtime.classhandling.JDKClassResetter.reset(); + resetClasses(); + org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); + org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); + org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); + } + + + private static void initializeClasses() { + org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VnfRollbackESTestscaffolding.class.getClassLoader() , + "org.openecomp.mso.adapters.vnf.async.client.MsoRequest", + "org.openecomp.mso.adapters.vnf.async.client.VnfRollback" + ); + } + + private static void resetClasses() { + } +} diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfStatusESTest.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfStatusESTest.java new file mode 100644 index 0000000..2f40d5e --- /dev/null +++ b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfStatusESTest.java @@ -0,0 +1,91 @@ +/* + * This file was automatically generated by EvoSuite + * Mon Nov 14 10:48:53 GMT 2016 + */ + +package org.openecomp.mso.adapters.vnf.async.client; + +import org.junit.Test; +import static org.junit.Assert.*; +import static org.evosuite.runtime.EvoAssertions.*; + +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 VnfStatusESTest extends VnfStatusESTestscaffolding { + + @Test(timeout = 4000) + public void test0() throws Throwable { + VnfStatus[] vnfStatusArray0 = VnfStatus.values(); + assertNotNull(vnfStatusArray0); + } + + @Test(timeout = 4000) + public void test2() throws Throwable { + // Undeclared exception! + try { + VnfStatus.valueOf((String) null); + fail("Expecting exception: NullPointerException"); + + } catch(NullPointerException e) { + // + // Name is null + // + verifyException("java.lang.Enum", e); + } + } + + @Test(timeout = 4000) + public void test3() throws Throwable { + // Undeclared exception! + try { + VnfStatus.valueOf(""); + fail("Expecting exception: IllegalArgumentException"); + + } catch(IllegalArgumentException e) { + // + // No enum constant org.openecomp.mso.adapters.vnf.async.client.VnfStatus. + // + verifyException("java.lang.Enum", e); + } + } + + @Test(timeout = 4000) + public void test4() throws Throwable { + // Undeclared exception! + try { + VnfStatus.fromValue((String) null); + fail("Expecting exception: NullPointerException"); + + } catch(NullPointerException e) { + // + // Name is null + // + verifyException("java.lang.Enum", e); + } + } + + @Test(timeout = 4000) + public void test5() throws Throwable { + // Undeclared exception! + try { + VnfStatus.fromValue(""); + fail("Expecting exception: IllegalArgumentException"); + + } catch(IllegalArgumentException e) { + // + // No enum constant org.openecomp.mso.adapters.vnf.async.client.VnfStatus. + // + verifyException("java.lang.Enum", e); + } + } + + @Test(timeout = 4000) + public void test7() throws Throwable { + VnfStatus vnfStatus0 = VnfStatus.NOTFOUND; + String string0 = vnfStatus0.value(); + assertEquals("NOTFOUND", string0); + } +} diff --git a/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfStatusESTestscaffolding.java b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfStatusESTestscaffolding.java new file mode 100644 index 0000000..7875037 --- /dev/null +++ b/adapters/mso-vnf-adapter-async-client/src/test/java/org/openecomp/mso/adapters/vnf/async/client/VnfStatusESTestscaffolding.java @@ -0,0 +1,83 @@ +/** + * Scaffolding file used to store all the setups needed to run + * tests automatically generated by EvoSuite + * Mon Nov 14 10:48:53 GMT 2016 + */ + +package org.openecomp.mso.adapters.vnf.async.client; + +import org.evosuite.runtime.annotation.EvoSuiteClassExclude; +import org.junit.BeforeClass; +import org.junit.Before; +import org.junit.After; +import org.junit.AfterClass; +import org.evosuite.runtime.sandbox.Sandbox; + +@EvoSuiteClassExclude +public class VnfStatusESTestscaffolding { + + @org.junit.Rule + public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); + + private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); + + private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); + + @BeforeClass + public static void initEvoSuiteFramework() { + org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.adapters.vnf.async.client.VnfStatus"; + org.evosuite.runtime.GuiSupport.initialize(); + org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; + org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; + org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; + org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; + org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); + org.evosuite.runtime.classhandling.JDKClassResetter.init(); + initializeClasses(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + } + + @AfterClass + public static void clearEvoSuiteFramework(){ + Sandbox.resetDefaultSecurityManager(); + java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); + } + + @Before + public void initTestCase(){ + threadStopper.storeCurrentThreads(); + threadStopper.startRecordingTime(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); + org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); + + org.evosuite.runtime.GuiSupport.setHeadless(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + org.evosuite.runtime.agent.InstrumentingAgent.activate(); + } + + @After + public void doneWithTestCase(){ + threadStopper.killAndJoinClientThreads(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); + org.evosuite.runtime.classhandling.JDKClassResetter.reset(); + resetClasses(); + org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); + org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); + org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); + } + + + private static void initializeClasses() { + org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VnfStatusESTestscaffolding.class.getClassLoader() , + "org.openecomp.mso.adapters.vnf.async.client.VnfStatus" + ); + } + + private static void resetClasses() { + org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(VnfStatusESTestscaffolding.class.getClassLoader()); + + org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( + "org.openecomp.mso.adapters.vnf.async.client.VnfStatus" + ); + } +} -- cgit 1.2.3-korg