diff options
author | 2017-09-08 13:27:46 -0400 | |
---|---|---|
committer | 2017-09-08 13:32:24 -0400 | |
commit | 62cd6aaaf74aa91ee0037c0e155c8e7284f07567 (patch) | |
tree | 68c0c53c9156f5aa3c6b3599ac940770f986633d /asdc-controller/src/test/java/org/openecomp/mso/asdc/client | |
parent | fa1a211d28a912892fcd888569df033900eb01ee (diff) |
1710 Rebase - Second Attempt
This commit rebases changes from openecomp-mso/internal-staging-1710 up to and including this codecloud commit:
54483fc6606ddb1591a2e9da61bff8712325f924
Wed Sep 6 18:12:56 2017 -0400
Rebasing was done on a branch on top of this commit in so/master in ONAP:
93fbdfbe46104f8859d4754040f979cb7997c157
Thu Sep 7 16:42:59 2017 +0000
Change-Id: I4ad9abf40da32bf5bdca43e868b8fa2dbcd9dc59
Issue-id: SO-107
Signed-off-by: Arthur Martella <amartell@research.att.com>
Diffstat (limited to 'asdc-controller/src/test/java/org/openecomp/mso/asdc/client')
11 files changed, 7 insertions, 646 deletions
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/DistributionStatusMessageESTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/DistributionStatusMessageESTest.java deleted file mode 100644 index e2112cee03..0000000000 --- a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/DistributionStatusMessageESTest.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * This file was automatically generated by EvoSuite - * Fri Nov 25 13:39:00 GMT 2016 - */ - -package org.openecomp.mso.asdc.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; -import org.openecomp.sdc.utils.DistributionStatusEnum; - -@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) -public class DistributionStatusMessageESTest extends DistributionStatusMessageESTestscaffolding { - - @Test(timeout = 4000) - public void test00() throws Throwable { - DistributionStatusEnum distributionStatusEnum0 = DistributionStatusEnum.ALREADY_DOWNLOADED; - DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage((String) null, (String) null, (String) null, distributionStatusEnum0, 1L); - long long0 = distributionStatusMessage0.getTimestamp(); - assertEquals(1L, long0); - } - - @Test(timeout = 4000) - public void test01() throws Throwable { - DistributionStatusEnum distributionStatusEnum0 = DistributionStatusEnum.ALREADY_DEPLOYED; - DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage("n*lho0\"NQ4azb%8]KN", "n*lho0\"NQ4azb%8]KN", "BMWmXl2i-B", distributionStatusEnum0, (-58L)); - long long0 = distributionStatusMessage0.getTimestamp(); - assertEquals("BMWmXl2i-B", distributionStatusMessage0.getDistributionID()); - assertEquals((-58L), long0); - assertEquals("n*lho0\"NQ4azb%8]KN", distributionStatusMessage0.getConsumerID()); - assertEquals("n*lho0\"NQ4azb%8]KN", distributionStatusMessage0.getArtifactURL()); - } - - @Test(timeout = 4000) - public void test02() throws Throwable { - DistributionStatusEnum distributionStatusEnum0 = DistributionStatusEnum.ALREADY_DOWNLOADED; - DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage((String) null, (String) null, (String) null, distributionStatusEnum0, 1L); - DistributionStatusEnum distributionStatusEnum1 = distributionStatusMessage0.getStatus(); - DistributionStatusMessage distributionStatusMessage1 = new DistributionStatusMessage("", (String) null, "*? q^M(_q^3$ZQ", distributionStatusEnum1, (-833L)); - String string0 = distributionStatusMessage1.getDistributionID(); - assertNotNull(string0); - assertEquals((-833L), distributionStatusMessage1.getTimestamp()); - assertEquals("", distributionStatusMessage1.getArtifactURL()); - assertEquals("*? q^M(_q^3$ZQ", string0); - } - - @Test(timeout = 4000) - public void test03() throws Throwable { - DistributionStatusEnum distributionStatusEnum0 = DistributionStatusEnum.ALREADY_DOWNLOADED; - DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage("", "", "", distributionStatusEnum0, 1L); - distributionStatusMessage0.getDistributionID(); - assertEquals(1L, distributionStatusMessage0.getTimestamp()); - } - - @Test(timeout = 4000) - public void test04() throws Throwable { - DistributionStatusEnum distributionStatusEnum0 = DistributionStatusEnum.ALREADY_DOWNLOADED; - DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage("ALREADY_DEPLOYED", "ALREADY_DEPLOYED", "ALREADY_DEPLOYED", distributionStatusEnum0, 0L); - String string0 = distributionStatusMessage0.getConsumerID(); - assertEquals("ALREADY_DEPLOYED", string0); - } - - @Test(timeout = 4000) - public void test05() throws Throwable { - DistributionStatusEnum distributionStatusEnum0 = DistributionStatusEnum.ALREADY_DOWNLOADED; - DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage((String) null, (String) null, (String) null, distributionStatusEnum0, 1L); - DistributionStatusEnum distributionStatusEnum1 = distributionStatusMessage0.getStatus(); - DistributionStatusMessage distributionStatusMessage1 = new DistributionStatusMessage((String) null, "", "Qcuo3~gd})vsI*", distributionStatusEnum1, 0L); - String string0 = distributionStatusMessage1.getConsumerID(); - assertNotNull(string0); - assertEquals(1L, distributionStatusMessage0.getTimestamp()); - assertEquals("", string0); - assertEquals("Qcuo3~gd})vsI*", distributionStatusMessage1.getDistributionID()); - } - - @Test(timeout = 4000) - public void test06() throws Throwable { - DistributionStatusEnum distributionStatusEnum0 = DistributionStatusEnum.ALREADY_DOWNLOADED; - DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage("ALREADY_DEPLOYED", "ALREADY_DEPLOYED", "ALREADY_DEPLOYED", distributionStatusEnum0, 0L); - String string0 = distributionStatusMessage0.getArtifactURL(); - assertEquals("ALREADY_DEPLOYED", string0); - } - - @Test(timeout = 4000) - public void test07() throws Throwable { - DistributionStatusEnum distributionStatusEnum0 = DistributionStatusEnum.ALREADY_DOWNLOADED; - DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage((String) null, (String) null, (String) null, distributionStatusEnum0, 1L); - DistributionStatusEnum distributionStatusEnum1 = distributionStatusMessage0.getStatus(); - DistributionStatusMessage distributionStatusMessage1 = new DistributionStatusMessage("", (String) null, "*? q^M(_q^3$ZQ", distributionStatusEnum1, (-833L)); - String string0 = distributionStatusMessage1.getArtifactURL(); - assertEquals("", string0); - assertEquals("*? q^M(_q^3$ZQ", distributionStatusMessage1.getDistributionID()); - assertNotNull(string0); - assertEquals((-833L), distributionStatusMessage1.getTimestamp()); - } - - @Test(timeout = 4000) - public void test08() throws Throwable { - DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage((String) null, (String) null, (String) null, (DistributionStatusEnum) null, 0L); - long long0 = distributionStatusMessage0.getTimestamp(); - assertEquals(0L, long0); - } - - @Test(timeout = 4000) - public void test09() throws Throwable { - DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage((String) null, (String) null, (String) null, (DistributionStatusEnum) null, 0L); - String string0 = distributionStatusMessage0.getDistributionID(); - assertNull(string0); - } - - @Test(timeout = 4000) - public void test10() throws Throwable { - DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage((String) null, (String) null, (String) null, (DistributionStatusEnum) null, 0L); - distributionStatusMessage0.getStatus(); - } - - @Test(timeout = 4000) - public void test11() throws Throwable { - DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage((String) null, (String) null, (String) null, (DistributionStatusEnum) null, 0L); - String string0 = distributionStatusMessage0.getConsumerID(); - assertNull(string0); - } - - @Test(timeout = 4000) - public void test12() throws Throwable { - DistributionStatusMessage distributionStatusMessage0 = new DistributionStatusMessage((String) null, (String) null, (String) null, (DistributionStatusEnum) null, 0L); - String string0 = distributionStatusMessage0.getArtifactURL(); - assertNull(string0); - } -} diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/DistributionStatusMessageESTestscaffolding.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/DistributionStatusMessageESTestscaffolding.java deleted file mode 100644 index f234ca64d5..0000000000 --- a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/DistributionStatusMessageESTestscaffolding.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Scaffolding file used to store all the setups needed to run - * tests automatically generated by EvoSuite - * Fri Nov 25 13:39:00 GMT 2016 - */ - -package org.openecomp.mso.asdc.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 DistributionStatusMessageESTestscaffolding { - - @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.asdc.client.DistributionStatusMessage"; - 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(DistributionStatusMessageESTestscaffolding.class.getClassLoader() , - "org.openecomp.sdc.utils.DistributionStatusEnum", - "org.openecomp.mso.asdc.client.DistributionStatusMessage", - "org.openecomp.sdc.api.consumer.IDistributionStatusMessage" - ); - } - - private static void resetClasses() { - } -} diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCControllerExceptionESTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCControllerExceptionESTest.java deleted file mode 100644 index 37af59c639..0000000000 --- a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCControllerExceptionESTest.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * This file was automatically generated by EvoSuite - * Fri Nov 25 13:39:27 GMT 2016 - */ - -package org.openecomp.mso.asdc.client.exceptions; - -import org.junit.Test; -import static org.junit.Assert.*; - -import org.evosuite.runtime.EvoRunner; -import org.evosuite.runtime.EvoRunnerParameters; -import org.evosuite.runtime.mock.java.lang.MockThrowable; -import org.junit.runner.RunWith; - -@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) -public class ASDCControllerExceptionESTest extends ASDCControllerExceptionESTestscaffolding { - - @Test(timeout = 4000) - public void test0() throws Throwable { - ASDCControllerException aSDCControllerException0 = new ASDCControllerException("org.openecomp.mso.asdc.client.exceptions.ASDCControllerException"); - MockThrowable mockThrowable0 = new MockThrowable("B+;:\"w4^M(-Y:e~=", (Throwable) aSDCControllerException0); - ASDCControllerException aSDCControllerException1 = new ASDCControllerException("The list of prefixes must not be null", (Throwable) mockThrowable0); - assertFalse(aSDCControllerException1.equals((Object)aSDCControllerException0)); - } -} diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCControllerExceptionESTestscaffolding.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCControllerExceptionESTestscaffolding.java deleted file mode 100644 index d6041c2fb2..0000000000 --- a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCControllerExceptionESTestscaffolding.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Scaffolding file used to store all the setups needed to run - * tests automatically generated by EvoSuite - * Fri Nov 25 13:39:27 GMT 2016 - */ - -package org.openecomp.mso.asdc.client.exceptions; - -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 ASDCControllerExceptionESTestscaffolding { - - @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.asdc.client.exceptions.ASDCControllerException"; - 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(ASDCControllerExceptionESTestscaffolding.class.getClassLoader() , - "org.openecomp.mso.asdc.client.exceptions.ASDCControllerException" - ); - } - - private static void resetClasses() { - org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ASDCControllerExceptionESTestscaffolding.class.getClassLoader()); - - org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( - "org.openecomp.mso.asdc.client.exceptions.ASDCControllerException" - ); - } -} diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCDownloadExceptionESTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCDownloadExceptionESTest.java deleted file mode 100644 index 75f4b5d27c..0000000000 --- a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCDownloadExceptionESTest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * This file was automatically generated by EvoSuite - * Fri Nov 25 13:38:49 GMT 2016 - */ - -package org.openecomp.mso.asdc.client.exceptions; - -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 ASDCDownloadExceptionESTest extends ASDCDownloadExceptionESTestscaffolding { - - @Test(timeout = 4000) - public void test0() throws Throwable { - ASDCDownloadException aSDCDownloadException0 = new ASDCDownloadException(""); - ASDCDownloadException aSDCDownloadException1 = new ASDCDownloadException("", (Throwable) aSDCDownloadException0); - assertFalse(aSDCDownloadException1.equals((Object)aSDCDownloadException0)); - } -} diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCDownloadExceptionESTestscaffolding.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCDownloadExceptionESTestscaffolding.java deleted file mode 100644 index 5db3c2098f..0000000000 --- a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCDownloadExceptionESTestscaffolding.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Scaffolding file used to store all the setups needed to run - * tests automatically generated by EvoSuite - * Fri Nov 25 13:38:49 GMT 2016 - */ - -package org.openecomp.mso.asdc.client.exceptions; - -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 ASDCDownloadExceptionESTestscaffolding { - - @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.asdc.client.exceptions.ASDCDownloadException"; - 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(ASDCDownloadExceptionESTestscaffolding.class.getClassLoader() , - "org.openecomp.mso.asdc.client.exceptions.ASDCDownloadException" - ); - } - - private static void resetClasses() { - org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ASDCDownloadExceptionESTestscaffolding.class.getClassLoader()); - - org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( - "org.openecomp.mso.asdc.client.exceptions.ASDCDownloadException" - ); - } -} diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCParametersExceptionESTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCParametersExceptionESTest.java deleted file mode 100644 index afc28346e3..0000000000 --- a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCParametersExceptionESTest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * This file was automatically generated by EvoSuite - * Fri Nov 25 13:39:10 GMT 2016 - */ - -package org.openecomp.mso.asdc.client.exceptions; - -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 ASDCParametersExceptionESTest extends ASDCParametersExceptionESTestscaffolding { - - @Test(timeout = 4000) - public void test0() throws Throwable { - ASDCParametersException aSDCParametersException0 = new ASDCParametersException("4vI_{2b<h&iIy"); - ASDCParametersException aSDCParametersException1 = new ASDCParametersException((String) null, (Throwable) aSDCParametersException0); - assertFalse(aSDCParametersException1.equals((Object)aSDCParametersException0)); - } -} diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCParametersExceptionESTestscaffolding.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCParametersExceptionESTestscaffolding.java deleted file mode 100644 index ce3afc92cd..0000000000 --- a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ASDCParametersExceptionESTestscaffolding.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Scaffolding file used to store all the setups needed to run - * tests automatically generated by EvoSuite - * Fri Nov 25 13:39:10 GMT 2016 - */ - -package org.openecomp.mso.asdc.client.exceptions; - -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 ASDCParametersExceptionESTestscaffolding { - - @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.asdc.client.exceptions.ASDCParametersException"; - 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(ASDCParametersExceptionESTestscaffolding.class.getClassLoader() , - "org.openecomp.mso.asdc.client.exceptions.ASDCParametersException" - ); - } - - private static void resetClasses() { - org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ASDCParametersExceptionESTestscaffolding.class.getClassLoader()); - - org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( - "org.openecomp.mso.asdc.client.exceptions.ASDCParametersException" - ); - } -} diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ArtifactInstallerExceptionESTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ArtifactInstallerExceptionESTest.java deleted file mode 100644 index 2a1c8177de..0000000000 --- a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ArtifactInstallerExceptionESTest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * This file was automatically generated by EvoSuite - * Fri Nov 25 13:38:39 GMT 2016 - */ - -package org.openecomp.mso.asdc.client.exceptions; - -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 ArtifactInstallerExceptionESTest extends ArtifactInstallerExceptionESTestscaffolding { - - @Test(timeout = 4000) - public void test0() throws Throwable { - ArtifactInstallerException artifactInstallerException0 = new ArtifactInstallerException("kD=Ua3["); - ArtifactInstallerException artifactInstallerException1 = new ArtifactInstallerException("kD=Ua3[", (Throwable) artifactInstallerException0); - assertFalse(artifactInstallerException1.equals((Object)artifactInstallerException0)); - } -} diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ArtifactInstallerExceptionESTestscaffolding.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ArtifactInstallerExceptionESTestscaffolding.java deleted file mode 100644 index 0bd3d65f0e..0000000000 --- a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/exceptions/ArtifactInstallerExceptionESTestscaffolding.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Scaffolding file used to store all the setups needed to run - * tests automatically generated by EvoSuite - * Fri Nov 25 13:38:39 GMT 2016 - */ - -package org.openecomp.mso.asdc.client.exceptions; - -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 ArtifactInstallerExceptionESTestscaffolding { - - @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.asdc.client.exceptions.ArtifactInstallerException"; - 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(ArtifactInstallerExceptionESTestscaffolding.class.getClassLoader() , - "org.openecomp.mso.asdc.client.exceptions.ArtifactInstallerException" - ); - } - - private static void resetClasses() { - org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ArtifactInstallerExceptionESTestscaffolding.class.getClassLoader()); - - org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( - "org.openecomp.mso.asdc.client.exceptions.ArtifactInstallerException" - ); - } -} diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/tests/YamlTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/tests/YamlTest.java index bce9324de9..7351b1b439 100644 --- a/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/tests/YamlTest.java +++ b/asdc-controller/src/test/java/org/openecomp/mso/asdc/client/tests/YamlTest.java @@ -53,7 +53,7 @@ public class YamlTest { InputStream input = new FileInputStream(new File("src/test/resources/resource-examples/simpleTest.yaml")); YamlEditor decoder = new YamlEditor (IOUtils.toByteArray(input)); - Set <HeatTemplateParam> paramSet = decoder.getParameterList(); + Set <HeatTemplateParam> paramSet = decoder.getParameterList("123456"); assertTrue(paramSet.size() == 5); @@ -79,12 +79,12 @@ public class YamlTest { Set <HeatTemplateParam> newParamSet = new HashSet <HeatTemplateParam> (); HeatTemplateParam heatParam1 = new HeatTemplateParam(); - heatParam1.setId(1); + heatParam1.setHeatTemplateArtifactUuid("1"); heatParam1.setParamName("testos1"); heatParam1.setParamType("string"); HeatTemplateParam heatParam2 = new HeatTemplateParam(); - heatParam2.setId(2); + heatParam2.setHeatTemplateArtifactUuid("2"); heatParam2.setParamName("testos2"); heatParam2.setParamType("number"); @@ -93,7 +93,7 @@ public class YamlTest { decoder.addParameterList(newParamSet); - Set <HeatTemplateParam> paramSet = decoder.getParameterList(); + Set <HeatTemplateParam> paramSet = decoder.getParameterList("123456"); assertTrue(paramSet.size() == 2); assertTrue(decoder.encode().contains("testos1")); @@ -111,12 +111,12 @@ public class YamlTest { Set <HeatTemplateParam> newParamSet = new HashSet <HeatTemplateParam> (); HeatTemplateParam heatParam1 = new HeatTemplateParam(); - heatParam1.setId(1); + heatParam1.setHeatTemplateArtifactUuid("1"); heatParam1.setParamName("testos1"); heatParam1.setParamType("string"); HeatTemplateParam heatParam2 = new HeatTemplateParam(); - heatParam2.setId(2); + heatParam2.setHeatTemplateArtifactUuid("2"); heatParam2.setParamName("testos2"); heatParam2.setParamType("number"); @@ -125,7 +125,7 @@ public class YamlTest { decoder.addParameterList(newParamSet); - Set <HeatTemplateParam> paramSet = decoder.getParameterList(); + Set <HeatTemplateParam> paramSet = decoder.getParameterList("123456"); assertTrue(paramSet.size() == 7); |