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/installer | |
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/installer')
8 files changed, 0 insertions, 1240 deletions
diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/BigDecimalVersionESTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/BigDecimalVersionESTest.java deleted file mode 100644 index 4675f05477..0000000000 --- a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/BigDecimalVersionESTest.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * This file was automatically generated by EvoSuite - * Fri Nov 25 13:37:47 GMT 2016 - */ - -package org.openecomp.mso.asdc.installer; - -import org.junit.Test; -import static org.junit.Assert.*; -import static org.evosuite.runtime.EvoAssertions.*; - -import java.math.BigDecimal; -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 BigDecimalVersionESTest extends BigDecimalVersionESTestscaffolding { - - @Test(timeout = 4000) - public void test00() throws Throwable { - String string0 = BigDecimalVersion.castAndCheckNotificationVersionToString("9"); - assertEquals("9", string0); - } - - @Test(timeout = 4000) - public void test01() throws Throwable { - BigDecimal bigDecimal0 = BigDecimalVersion.castAndCheckNotificationVersion("0"); - assertEquals(0, bigDecimal0.shortValue()); - } - - @Test(timeout = 4000) - public void test02() throws Throwable { - BigDecimal bigDecimal0 = BigDecimalVersion.castAndCheckNotificationVersion("9"); - assertEquals(9, bigDecimal0.byteValue()); - } - - @Test(timeout = 4000) - public void test03() throws Throwable { - BigDecimal bigDecimal0 = BigDecimalVersion.castAndCheckNotificationVersion("-1"); - assertEquals(-1, bigDecimal0.byteValue()); - } - - @Test(timeout = 4000) - public void test04() throws Throwable { - // Undeclared exception! - try { - BigDecimalVersion.castAndCheckNotificationVersionToString("fgt+&6@pL9`5EE}.!.,"); - fail("Expecting exception: NumberFormatException"); - - } catch(NumberFormatException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("java.math.BigDecimal", e); - } - } - - @Test(timeout = 4000) - public void test05() throws Throwable { - // Undeclared exception! - try { - BigDecimalVersion.castAndCheckNotificationVersionToString((String) null); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.asdc.installer.BigDecimalVersion", e); - } - } - - @Test(timeout = 4000) - public void test06() throws Throwable { - // Undeclared exception! - try { - BigDecimalVersion.castAndCheckNotificationVersion((String) null); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.asdc.installer.BigDecimalVersion", e); - } - } - - @Test(timeout = 4000) - public void test07() throws Throwable { - // Undeclared exception! - try { - BigDecimalVersion.castAndCheckNotificationVersion("."); - fail("Expecting exception: ArrayIndexOutOfBoundsException"); - - } catch(ArrayIndexOutOfBoundsException e) { - // - // 0 - // - verifyException("org.openecomp.mso.asdc.installer.BigDecimalVersion", e); - } - } - - @Test(timeout = 4000) - public void test08() throws Throwable { - // Undeclared exception! - try { - BigDecimalVersion.castAndCheckNotificationVersion("Mf**K`5E.~Fu.,q"); - fail("Expecting exception: NumberFormatException"); - - } catch(NumberFormatException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("java.math.BigDecimal", e); - } - } - - @Test(timeout = 4000) - public void test09() throws Throwable { - BigDecimalVersion bigDecimalVersion0 = new BigDecimalVersion(); - } - - @Test(timeout = 4000) - public void test10() throws Throwable { - // Undeclared exception! - try { - BigDecimalVersion.castAndCheckNotificationVersionToString("."); - fail("Expecting exception: ArrayIndexOutOfBoundsException"); - - } catch(ArrayIndexOutOfBoundsException e) { - // - // 0 - // - verifyException("org.openecomp.mso.asdc.installer.BigDecimalVersion", e); - } - } -} diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/BigDecimalVersionESTestscaffolding.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/BigDecimalVersionESTestscaffolding.java deleted file mode 100644 index c04ada8396..0000000000 --- a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/BigDecimalVersionESTestscaffolding.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Scaffolding file used to store all the setups needed to run - * tests automatically generated by EvoSuite - * Fri Nov 25 13:37:47 GMT 2016 - */ - -package org.openecomp.mso.asdc.installer; - -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 BigDecimalVersionESTestscaffolding { - - @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.installer.BigDecimalVersion"; - 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(BigDecimalVersionESTestscaffolding.class.getClassLoader() , - "org.openecomp.mso.asdc.installer.BigDecimalVersion" - ); - } - - private static void resetClasses() { - } -} diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleArtifactESTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleArtifactESTest.java deleted file mode 100644 index c9b29ae57f..0000000000 --- a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleArtifactESTest.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * This file was automatically generated by EvoSuite - * Fri Nov 25 13:20:32 GMT 2016 - */ - -package org.openecomp.mso.asdc.installer; - -import org.junit.Test; -import static org.junit.Assert.*; -import static org.evosuite.shaded.org.mockito.Mockito.*; -import static org.evosuite.runtime.EvoAssertions.*; - -import org.evosuite.runtime.EvoRunner; -import org.evosuite.runtime.EvoRunnerParameters; -import org.evosuite.runtime.PrivateAccess; -import org.evosuite.runtime.ViolatedAssumptionAnswer; -import org.junit.runner.RunWith; -import org.openecomp.sdc.api.notification.IArtifactInfo; -import org.openecomp.sdc.api.results.IDistributionClientDownloadResult; -import org.openecomp.sdc.impl.DistributionClientDownloadResultImpl; -import org.openecomp.sdc.utils.DistributionActionResultEnum; - -@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) -public class VfModuleArtifactESTest extends VfModuleArtifactESTestscaffolding { - - @Test(timeout = 4000) - public void test00() throws Throwable { - IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer()); - DistributionActionResultEnum distributionActionResultEnum0 = DistributionActionResultEnum.CONF_MISSING_ARTIFACT_TYPES; - byte[] byteArray0 = new byte[1]; - DistributionClientDownloadResultImpl distributionClientDownloadResultImpl0 = new DistributionClientDownloadResultImpl(distributionActionResultEnum0, "7pKd8", "7pKd8", byteArray0); - VfModuleArtifact vfModuleArtifact0 = new VfModuleArtifact(iArtifactInfo0, (IDistributionClientDownloadResult) distributionClientDownloadResultImpl0); - PrivateAccess.setVariable((Class<VfModuleArtifact>) VfModuleArtifact.class, vfModuleArtifact0, "result", (Object) null); - vfModuleArtifact0.getResult(); - assertEquals(0, vfModuleArtifact0.getDeployedInDb()); - } - - @Test(timeout = 4000) - public void test01() throws Throwable { - IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer()); - DistributionActionResultEnum distributionActionResultEnum0 = DistributionActionResultEnum.DISTRIBUTION_CLIENT_ALREADY_INITIALIZED; - byte[] byteArray0 = new byte[0]; - DistributionClientDownloadResultImpl distributionClientDownloadResultImpl0 = new DistributionClientDownloadResultImpl(distributionActionResultEnum0, "o<Q", "o<Q", byteArray0); - VfModuleArtifact vfModuleArtifact0 = new VfModuleArtifact(iArtifactInfo0, (IDistributionClientDownloadResult) distributionClientDownloadResultImpl0); - vfModuleArtifact0.getResult(); - assertEquals(0, vfModuleArtifact0.getDeployedInDb()); - } - - @Test(timeout = 4000) - public void test02() throws Throwable { - IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer()); - DistributionActionResultEnum distributionActionResultEnum0 = DistributionActionResultEnum.DISTRIBUTION_CLIENT_ALREADY_INITIALIZED; - byte[] byteArray0 = new byte[0]; - DistributionClientDownloadResultImpl distributionClientDownloadResultImpl0 = new DistributionClientDownloadResultImpl(distributionActionResultEnum0, "o<Q", "o<Q", byteArray0); - VfModuleArtifact vfModuleArtifact0 = new VfModuleArtifact(iArtifactInfo0, (IDistributionClientDownloadResult) distributionClientDownloadResultImpl0); - vfModuleArtifact0.incrementDeployedInDB(); - int int0 = vfModuleArtifact0.getDeployedInDb(); - assertEquals(1, int0); - } - - @Test(timeout = 4000) - public void test03() throws Throwable { - IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer()); - DistributionActionResultEnum distributionActionResultEnum0 = DistributionActionResultEnum.CONF_MISSING_ASDC_FQDN; - byte[] byteArray0 = new byte[2]; - DistributionClientDownloadResultImpl distributionClientDownloadResultImpl0 = new DistributionClientDownloadResultImpl(distributionActionResultEnum0, "qZr'D", "qZr'D", byteArray0); - VfModuleArtifact vfModuleArtifact0 = new VfModuleArtifact(iArtifactInfo0, (IDistributionClientDownloadResult) distributionClientDownloadResultImpl0); - PrivateAccess.setVariable((Class<VfModuleArtifact>) VfModuleArtifact.class, vfModuleArtifact0, "deployedInDb", (Object) (-40)); - int int0 = vfModuleArtifact0.getDeployedInDb(); - assertEquals((-40), int0); - } - - @Test(timeout = 4000) - public void test04() throws Throwable { - IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer()); - DistributionActionResultEnum distributionActionResultEnum0 = DistributionActionResultEnum.DISTRIBUTION_CLIENT_ALREADY_INITIALIZED; - byte[] byteArray0 = new byte[0]; - DistributionClientDownloadResultImpl distributionClientDownloadResultImpl0 = new DistributionClientDownloadResultImpl(distributionActionResultEnum0, "o<Q", "o<Q", byteArray0); - VfModuleArtifact vfModuleArtifact0 = new VfModuleArtifact(iArtifactInfo0, (IDistributionClientDownloadResult) distributionClientDownloadResultImpl0); - vfModuleArtifact0.setCatalogObject(byteArray0); - vfModuleArtifact0.getCatalogObject(); - assertEquals(0, vfModuleArtifact0.getDeployedInDb()); - } - - @Test(timeout = 4000) - public void test05() throws Throwable { - IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer()); - doReturn("o<Q").when(iArtifactInfo0).toString(); - DistributionActionResultEnum distributionActionResultEnum0 = DistributionActionResultEnum.DISTRIBUTION_CLIENT_ALREADY_INITIALIZED; - byte[] byteArray0 = new byte[0]; - DistributionClientDownloadResultImpl distributionClientDownloadResultImpl0 = new DistributionClientDownloadResultImpl(distributionActionResultEnum0, "o<Q", "o<Q", byteArray0); - VfModuleArtifact vfModuleArtifact0 = new VfModuleArtifact(iArtifactInfo0, (IDistributionClientDownloadResult) distributionClientDownloadResultImpl0); - vfModuleArtifact0.getArtifactInfo(); - assertEquals(0, vfModuleArtifact0.getDeployedInDb()); - } - - @Test(timeout = 4000) - public void test06() throws Throwable { - VfModuleArtifact vfModuleArtifact0 = null; - try { - vfModuleArtifact0 = new VfModuleArtifact((IArtifactInfo) null, (IDistributionClientDownloadResult) null); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.asdc.installer.VfModuleArtifact", e); - } - } - - @Test(timeout = 4000) - public void test07() throws Throwable { - IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer()); - DistributionActionResultEnum distributionActionResultEnum0 = DistributionActionResultEnum.DISTRIBUTION_CLIENT_ALREADY_INITIALIZED; - byte[] byteArray0 = new byte[0]; - DistributionClientDownloadResultImpl distributionClientDownloadResultImpl0 = new DistributionClientDownloadResultImpl(distributionActionResultEnum0, "o<Q", "o<Q", byteArray0); - VfModuleArtifact vfModuleArtifact0 = new VfModuleArtifact(iArtifactInfo0, (IDistributionClientDownloadResult) distributionClientDownloadResultImpl0); - vfModuleArtifact0.getCatalogObject(); - assertEquals(0, vfModuleArtifact0.getDeployedInDb()); - } - - @Test(timeout = 4000) - public void test08() throws Throwable { - IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer()); - DistributionActionResultEnum distributionActionResultEnum0 = DistributionActionResultEnum.CONF_MISSING_ARTIFACT_TYPES; - byte[] byteArray0 = new byte[1]; - DistributionClientDownloadResultImpl distributionClientDownloadResultImpl0 = new DistributionClientDownloadResultImpl(distributionActionResultEnum0, "7pKd8", "7pKd8", byteArray0); - VfModuleArtifact vfModuleArtifact0 = new VfModuleArtifact(iArtifactInfo0, (IDistributionClientDownloadResult) distributionClientDownloadResultImpl0); - vfModuleArtifact0.getResult(); - assertEquals(0, vfModuleArtifact0.getDeployedInDb()); - } - - @Test(timeout = 4000) - public void test09() throws Throwable { - IArtifactInfo iArtifactInfo0 = mock(IArtifactInfo.class, new ViolatedAssumptionAnswer()); - DistributionActionResultEnum distributionActionResultEnum0 = DistributionActionResultEnum.CONF_MISSING_ASDC_FQDN; - byte[] byteArray0 = new byte[2]; - DistributionClientDownloadResultImpl distributionClientDownloadResultImpl0 = new DistributionClientDownloadResultImpl(distributionActionResultEnum0, "qZr'D", "qZr'D", byteArray0); - VfModuleArtifact vfModuleArtifact0 = new VfModuleArtifact(iArtifactInfo0, (IDistributionClientDownloadResult) distributionClientDownloadResultImpl0); - int int0 = vfModuleArtifact0.getDeployedInDb(); - assertEquals(0, int0); - } - - @Test(timeout = 4000) - public void test10() throws Throwable { - DistributionActionResultEnum distributionActionResultEnum0 = DistributionActionResultEnum.DISTRIBUTION_CLIENT_IS_TERMINATED; - byte[] byteArray0 = new byte[5]; - DistributionClientDownloadResultImpl distributionClientDownloadResultImpl0 = new DistributionClientDownloadResultImpl(distributionActionResultEnum0, "", "", byteArray0); - VfModuleArtifact vfModuleArtifact0 = new VfModuleArtifact((IArtifactInfo) null, (IDistributionClientDownloadResult) distributionClientDownloadResultImpl0); - vfModuleArtifact0.getArtifactInfo(); - assertEquals(0, vfModuleArtifact0.getDeployedInDb()); - } -} diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleArtifactESTestscaffolding.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleArtifactESTestscaffolding.java deleted file mode 100644 index 75c5f1588f..0000000000 --- a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleArtifactESTestscaffolding.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Scaffolding file used to store all the setups needed to run - * tests automatically generated by EvoSuite - * Fri Nov 25 13:20:32 GMT 2016 - */ - -package org.openecomp.mso.asdc.installer; - -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 VfModuleArtifactESTestscaffolding { - - @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.installer.VfModuleArtifact"; - 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(VfModuleArtifactESTestscaffolding.class.getClassLoader() , - "org.openecomp.mso.asdc.installer.VfModuleArtifact", - "org.openecomp.sdc.utils.DistributionActionResultEnum", - "org.openecomp.sdc.impl.DistributionClientResultImpl", - "org.openecomp.sdc.impl.DistributionClientDownloadResultImpl", - "org.openecomp.sdc.api.results.IDistributionClientResult", - "org.openecomp.sdc.api.results.IDistributionClientDownloadResult", - "org.openecomp.sdc.api.notification.IArtifactInfo" - ); - } - - private static void resetClasses() { - } -} diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleMetaDataESTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleMetaDataESTest.java deleted file mode 100644 index f87f9068f2..0000000000 --- a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleMetaDataESTest.java +++ /dev/null @@ -1,517 +0,0 @@ -/* - * This file was automatically generated by EvoSuite - * Fri Feb 24 16:02:34 GMT 2017 - */ - -package org.openecomp.mso.asdc.installer; - -import org.junit.Test; -import static org.junit.Assert.*; -import static org.evosuite.shaded.org.mockito.Mockito.*; -import static org.evosuite.runtime.EvoAssertions.*; -import java.util.List; -import java.util.Map; -import org.evosuite.runtime.EvoRunner; -import org.evosuite.runtime.EvoRunnerParameters; -import org.evosuite.runtime.PrivateAccess; -import org.evosuite.runtime.ViolatedAssumptionAnswer; -import org.junit.runner.RunWith; - -@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) -public class VfModuleMetaDataESTest extends VfModuleMetaDataESTestscaffolding { - - @Test(timeout = 4000) - public void test00() throws Throwable { - VfModuleMetaData vfModuleMetaData0 = new VfModuleMetaData(); - List<Boolean> list0 = (List<Boolean>) mock(List.class, new ViolatedAssumptionAnswer()); - Integer integer0 = new Integer((-13)); - vfModuleMetaData0.setAttribute("", integer0); - vfModuleMetaData0.setAttribute("", ""); - Map<Boolean, Boolean> map0 = (Map<Boolean, Boolean>) mock(Map.class, new ViolatedAssumptionAnswer()); - doReturn((Object) null).when(map0).put(any() , any()); - PrivateAccess.setVariable((Class<VfModuleMetaData>) VfModuleMetaData.class, vfModuleMetaData0, "attributesMap", (Object) map0); - List<Boolean> list1 = (List<Boolean>) mock(List.class, new ViolatedAssumptionAnswer()); - PrivateAccess.setVariable((Class<VfModuleMetaData>) VfModuleMetaData.class, vfModuleMetaData0, "artifacts", (Object) list1); - vfModuleMetaData0.setAttribute("kup1s\"/L_ ", "kup1s\"/L_ "); - PrivateAccess.setVariable((Class<VfModuleMetaData>) VfModuleMetaData.class, vfModuleMetaData0, "artifacts", (Object) list0); - Map<Object, Boolean> map1 = (Map<Object, Boolean>) mock(Map.class, new ViolatedAssumptionAnswer()); - PrivateAccess.setVariable((Class<VfModuleMetaData>) VfModuleMetaData.class, vfModuleMetaData0, "properties", (Object) map1); - Map<Object, Boolean> map2 = (Map<Object, Boolean>) mock(Map.class, new ViolatedAssumptionAnswer()); - PrivateAccess.setVariable((Class<VfModuleMetaData>) VfModuleMetaData.class, vfModuleMetaData0, "attributesMap", (Object) map2); - Map<String, Integer> map3 = (Map<String, Integer>) mock(Map.class, new ViolatedAssumptionAnswer()); - PrivateAccess.setVariable((Class<VfModuleMetaData>) VfModuleMetaData.class, vfModuleMetaData0, "attributesMap", (Object) map3); - VfModuleMetaData vfModuleMetaData1 = new VfModuleMetaData(); - List<String> list2 = (List<String>) mock(List.class, new ViolatedAssumptionAnswer()); - PrivateAccess.setVariable((Class<VfModuleMetaData>) VfModuleMetaData.class, vfModuleMetaData1, "artifacts", (Object) list2); - vfModuleMetaData1.setAttribute((String) null, ""); - vfModuleMetaData1.setAttribute("", ""); - PrivateAccess.setVariable((Class<VfModuleMetaData>) VfModuleMetaData.class, vfModuleMetaData1, "properties", (Object) null); - vfModuleMetaData1.getProperties(); - vfModuleMetaData0.setAttribute("", integer0); - PrivateAccess.setVariable((Class<VfModuleMetaData>) VfModuleMetaData.class, vfModuleMetaData0, "attributesMap", (Object) null); - // Undeclared exception! - try { - vfModuleMetaData1.isBase(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.asdc.installer.VfModuleMetaData", e); - } - } - - @Test(timeout = 4000) - public void test01() throws Throwable { - VfModuleMetaData vfModuleMetaData0 = new VfModuleMetaData(); - Map<String, String> map0 = vfModuleMetaData0.getProperties(); - List<Object> list0 = (List<Object>) mock(List.class, new ViolatedAssumptionAnswer()); - PrivateAccess.setVariable((Class<VfModuleMetaData>) VfModuleMetaData.class, vfModuleMetaData0, "artifacts", (Object) list0); - PrivateAccess.setVariable((Class<VfModuleMetaData>) VfModuleMetaData.class, vfModuleMetaData0, "attributesMap", (Object) map0); - vfModuleMetaData0.setAttribute(")aPjhY=.[,~@B5", ")aPjhY=.[,~@B5"); - vfModuleMetaData0.setAttribute(")aPjhY=.[,~@B5", ""); - vfModuleMetaData0.setAttribute(")aPjhY=.[,~@B5", ""); - Integer integer0 = new Integer((-6)); - vfModuleMetaData0.setAttribute(")aPjhY=.[,~@B5", integer0); - PrivateAccess.setVariable((Class<VfModuleMetaData>) VfModuleMetaData.class, vfModuleMetaData0, "properties", (Object) map0); - Map<Boolean, String> map1 = (Map<Boolean, String>) mock(Map.class, new ViolatedAssumptionAnswer()); - doReturn((Object) null).when(map1).put(any() , any()); - PrivateAccess.setVariable((Class<VfModuleMetaData>) VfModuleMetaData.class, vfModuleMetaData0, "attributesMap", (Object) map1); - vfModuleMetaData0.setAttribute((String) null, integer0); - Integer integer1 = new Integer((-1)); - vfModuleMetaData0.setAttribute("&$*6wB^=VXY/.Gj`T", integer1); - Map<String, String> map2 = vfModuleMetaData0.getProperties(); - PrivateAccess.setVariable((Class<VfModuleMetaData>) VfModuleMetaData.class, vfModuleMetaData0, "attributesMap", (Object) map2); - Map<String, String> map3 = vfModuleMetaData0.getProperties(); - PrivateAccess.setVariable((Class<VfModuleMetaData>) VfModuleMetaData.class, vfModuleMetaData0, "attributesMap", (Object) map3); - List<Boolean> list1 = (List<Boolean>) mock(List.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(list1).toString(); - PrivateAccess.setVariable((Class<VfModuleMetaData>) VfModuleMetaData.class, vfModuleMetaData0, "artifacts", (Object) list1); - List<String> list2 = vfModuleMetaData0.getArtifacts(); - PrivateAccess.setVariable((Class<VfModuleMetaData>) VfModuleMetaData.class, vfModuleMetaData0, "properties", (Object) map3); - PrivateAccess.setVariable((Class<VfModuleMetaData>) VfModuleMetaData.class, vfModuleMetaData0, "artifacts", (Object) list2); - // Undeclared exception! - try { - vfModuleMetaData0.isBase(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.asdc.installer.VfModuleMetaData", e); - } - } - - @Test(timeout = 4000) - public void test02() throws Throwable { - VfModuleMetaData vfModuleMetaData0 = new VfModuleMetaData(); - vfModuleMetaData0.getVfModuleModelUUID(); - vfModuleMetaData0.setAttribute("", ""); - vfModuleMetaData0.setAttribute("X0s-/&YT>", "X0s-/&YT>"); - vfModuleMetaData0.getArtifacts(); - vfModuleMetaData0.setAttribute("vfModuleModelUUID", ""); - vfModuleMetaData0.setAttribute("RHO{0R!FJsK+:s.q", ""); - vfModuleMetaData0.setAttribute((String) null, ""); - vfModuleMetaData0.setAttribute("", ""); - vfModuleMetaData0.getVfModuleModelUUID(); - vfModuleMetaData0.getArtifacts(); - vfModuleMetaData0.getProperties(); - vfModuleMetaData0.getVfModuleModelUUID(); - vfModuleMetaData0.getArtifacts(); - vfModuleMetaData0.setAttribute("", ""); - vfModuleMetaData0.getVfModuleModelUUID(); - vfModuleMetaData0.getArtifacts(); - // Undeclared exception! - try { - vfModuleMetaData0.isBase(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.asdc.installer.VfModuleMetaData", e); - } - } - - @Test(timeout = 4000) - public void test03() throws Throwable { - VfModuleMetaData vfModuleMetaData0 = new VfModuleMetaData(); - vfModuleMetaData0.setAttribute("6NJ#o #-{", "6NJ#o #-{"); - vfModuleMetaData0.setAttribute("", ""); - vfModuleMetaData0.setAttribute("", "3o(D\" <bgGVHg"); - vfModuleMetaData0.setAttribute("vfModuleModelVersion", ""); - vfModuleMetaData0.setAttribute("y", ""); - vfModuleMetaData0.setAttribute("", ""); - vfModuleMetaData0.getVfModuleModelVersion(); - // Undeclared exception! - try { - vfModuleMetaData0.isBase(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.asdc.installer.VfModuleMetaData", e); - } - } - - @Test(timeout = 4000) - public void test04() throws Throwable { - VfModuleMetaData vfModuleMetaData0 = new VfModuleMetaData(); - vfModuleMetaData0.setAttribute("vfModuleModelDescription", "vfModuleModelDescription"); - vfModuleMetaData0.setAttribute("vfModuleModelDescription", "vfModuleModelDescription"); - vfModuleMetaData0.getArtifacts(); - vfModuleMetaData0.setAttribute("", ""); - vfModuleMetaData0.setAttribute("vfModuleModelDescription", ""); - vfModuleMetaData0.setAttribute("", ""); - vfModuleMetaData0.setAttribute("z9,}N0\"L]xH@", (Object) null); - vfModuleMetaData0.getProperties(); - vfModuleMetaData0.getVfModuleModelDescription(); - vfModuleMetaData0.getVfModuleModelVersion(); - vfModuleMetaData0.setAttribute("", (Object) null); - vfModuleMetaData0.getVfModuleModelDescription(); - vfModuleMetaData0.getVfModuleModelVersion(); - vfModuleMetaData0.getArtifacts(); - // Undeclared exception! - try { - vfModuleMetaData0.isBase(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.asdc.installer.VfModuleMetaData", e); - } - } - - @Test(timeout = 4000) - public void test05() throws Throwable { - VfModuleMetaData vfModuleMetaData0 = new VfModuleMetaData(); - vfModuleMetaData0.getVfModuleModelCustomizationUUID(); - vfModuleMetaData0.setAttribute((String) null, (Object) null); - vfModuleMetaData0.setAttribute("vfModuleModelUUID", "vfModuleModelUUID"); - vfModuleMetaData0.getProperties(); - vfModuleMetaData0.getVfModuleModelDescription(); - vfModuleMetaData0.getVfModuleModelUUID(); - vfModuleMetaData0.getArtifacts(); - vfModuleMetaData0.getVfModuleModelVersion(); - vfModuleMetaData0.getVfModuleModelUUID(); - VfModuleMetaData vfModuleMetaData1 = new VfModuleMetaData(); - assertNull(vfModuleMetaData1.getVfModuleModelName()); - } - - @Test(timeout = 4000) - public void test06() throws Throwable { - VfModuleMetaData vfModuleMetaData0 = new VfModuleMetaData(); - vfModuleMetaData0.setAttribute("a.8XV,jQU\"Su_&pz", (Object) null); - vfModuleMetaData0.setAttribute("<A|K", "vfModuleModelInvariantUUID"); - vfModuleMetaData0.setAttribute("vfModuleModelInvariantUUID", "vfModuleModelInvariantUUID"); - vfModuleMetaData0.setAttribute("vfModuleModelInvariantUUID", ""); - vfModuleMetaData0.getVfModuleModelVersion(); - vfModuleMetaData0.setAttribute("vfModuleModelUUID", "vfModuleModelUUID"); - Map<String, String> map0 = vfModuleMetaData0.getProperties(); - vfModuleMetaData0.getVfModuleModelInvariantUUID(); - vfModuleMetaData0.setAttribute("", ""); - vfModuleMetaData0.setAttribute("", "w(f2d"); - vfModuleMetaData0.setAttribute("", map0); - vfModuleMetaData0.setAttribute("<A|K", ""); - vfModuleMetaData0.setAttribute("", ""); - vfModuleMetaData0.getVfModuleModelCustomizationUUID(); - vfModuleMetaData0.getVfModuleModelDescription(); - vfModuleMetaData0.getVfModuleModelCustomizationUUID(); - // Undeclared exception! - try { - vfModuleMetaData0.isBase(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.asdc.installer.VfModuleMetaData", e); - } - } - - @Test(timeout = 4000) - public void test07() throws Throwable { - VfModuleMetaData vfModuleMetaData0 = new VfModuleMetaData(); - vfModuleMetaData0.setAttribute("vfModuleModelDescription", "vfModuleModelDescription"); - Map<String, String> map0 = vfModuleMetaData0.getProperties(); - vfModuleMetaData0.setAttribute("vfModuleModelDescription", "vfModuleModelDescription"); - vfModuleMetaData0.setAttribute("vfModuleModelDescription", map0); - vfModuleMetaData0.getVfModuleModelCustomizationUUID(); - vfModuleMetaData0.getArtifacts(); - vfModuleMetaData0.getProperties(); - // Undeclared exception! - try { - vfModuleMetaData0.getVfModuleModelDescription(); - fail("Expecting exception: ClassCastException"); - - } catch(ClassCastException e) { - // - // java.util.HashMap cannot be cast to java.lang.String - // - verifyException("org.openecomp.mso.asdc.installer.VfModuleMetaData", e); - } - } - - @Test(timeout = 4000) - public void test08() throws Throwable { - VfModuleMetaData vfModuleMetaData0 = new VfModuleMetaData(); - vfModuleMetaData0.setAttribute("vfModuleModelDescription", "vfModuleModelDescription"); - vfModuleMetaData0.setAttribute("}U?", ""); - vfModuleMetaData0.getVfModuleModelVersion(); - vfModuleMetaData0.setAttribute("f78C:y", (Object) null); - vfModuleMetaData0.getArtifacts(); - vfModuleMetaData0.getVfModuleModelVersion(); - vfModuleMetaData0.getVfModuleModelUUID(); - vfModuleMetaData0.getVfModuleModelVersion(); - vfModuleMetaData0.getVfModuleModelDescription(); - vfModuleMetaData0.setAttribute("", ""); - vfModuleMetaData0.getVfModuleModelVersion(); - vfModuleMetaData0.getVfModuleModelDescription(); - vfModuleMetaData0.getVfModuleModelName(); - vfModuleMetaData0.getProperties(); - vfModuleMetaData0.getVfModuleModelVersion(); - // Undeclared exception! - try { - vfModuleMetaData0.isBase(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.asdc.installer.VfModuleMetaData", e); - } - } - - @Test(timeout = 4000) - public void test09() throws Throwable { - VfModuleMetaData vfModuleMetaData0 = new VfModuleMetaData(); - vfModuleMetaData0.setAttribute("Q> 'piXimPhE", "Q> 'piXimPhE"); - vfModuleMetaData0.setAttribute("Q> 'piXimPhE", "("); - vfModuleMetaData0.setAttribute("D0kbC~", "Q> 'piXimPhE"); - vfModuleMetaData0.setAttribute("", "D0kbC~"); - vfModuleMetaData0.setAttribute("(", ""); - vfModuleMetaData0.setAttribute("vfModuleModelVersion", "][,6>~[xc,"); - vfModuleMetaData0.setAttribute("", "("); - vfModuleMetaData0.getVfModuleModelCustomizationUUID(); - vfModuleMetaData0.getVfModuleModelCustomizationUUID(); - vfModuleMetaData0.getVfModuleModelDescription(); - vfModuleMetaData0.getVfModuleModelDescription(); - vfModuleMetaData0.getVfModuleModelInvariantUUID(); - vfModuleMetaData0.getVfModuleModelVersion(); - vfModuleMetaData0.setAttribute("D0kbC~", "vfModuleModelVersion"); - // Undeclared exception! - try { - vfModuleMetaData0.isBase(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.asdc.installer.VfModuleMetaData", e); - } - } - - @Test(timeout = 4000) - public void test10() throws Throwable { - VfModuleMetaData vfModuleMetaData0 = new VfModuleMetaData(); - vfModuleMetaData0.setAttribute("vfModuleModelUUID", ""); - vfModuleMetaData0.setAttribute("vfModuleModelCustomizationUUID", ""); - vfModuleMetaData0.setAttribute("", ""); - vfModuleMetaData0.getVfModuleModelCustomizationUUID(); - // Undeclared exception! - try { - vfModuleMetaData0.isBase(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.asdc.installer.VfModuleMetaData", e); - } - } - - @Test(timeout = 4000) - public void test11() throws Throwable { - VfModuleMetaData vfModuleMetaData0 = new VfModuleMetaData(); - vfModuleMetaData0.setAttribute("", ""); - vfModuleMetaData0.setAttribute("isBase", "isBase"); - vfModuleMetaData0.setAttribute("isBase", ""); - vfModuleMetaData0.getVfModuleModelCustomizationUUID(); - vfModuleMetaData0.getArtifacts(); - // Undeclared exception! - try { - vfModuleMetaData0.isBase(); - fail("Expecting exception: ClassCastException"); - - } catch(ClassCastException e) { - // - // java.lang.String cannot be cast to java.lang.Boolean - // - verifyException("org.openecomp.mso.asdc.installer.VfModuleMetaData", e); - } - } - - @Test(timeout = 4000) - public void test12() throws Throwable { - VfModuleMetaData vfModuleMetaData0 = new VfModuleMetaData(); - vfModuleMetaData0.setAttribute("vfModuleModelName", "vfModuleModelName"); - vfModuleMetaData0.getVfModuleModelInvariantUUID(); - vfModuleMetaData0.setAttribute("mp+0S", (Object) null); - vfModuleMetaData0.setAttribute("EVNf'G}^Q", "mp+0S"); - vfModuleMetaData0.getVfModuleModelInvariantUUID(); - vfModuleMetaData0.getVfModuleModelInvariantUUID(); - vfModuleMetaData0.getVfModuleModelName(); - vfModuleMetaData0.getVfModuleModelName(); - vfModuleMetaData0.getArtifacts(); - vfModuleMetaData0.getVfModuleModelName(); - vfModuleMetaData0.setAttribute("Pw5`cyIph)xX&#zj~'", (Object) null); - vfModuleMetaData0.getVfModuleModelVersion(); - vfModuleMetaData0.getVfModuleModelName(); - // Undeclared exception! - try { - vfModuleMetaData0.isBase(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.asdc.installer.VfModuleMetaData", e); - } - } - - @Test(timeout = 4000) - public void test13() throws Throwable { - VfModuleMetaData vfModuleMetaData0 = new VfModuleMetaData(); - vfModuleMetaData0.setAttribute("vfModuleModelName", "vfModuleModelName"); - vfModuleMetaData0.getVfModuleModelVersion(); - vfModuleMetaData0.getVfModuleModelInvariantUUID(); - vfModuleMetaData0.getVfModuleModelVersion(); - vfModuleMetaData0.setAttribute("", (Object) null); - vfModuleMetaData0.setAttribute((String) null, "vfModuleModelName"); - vfModuleMetaData0.setAttribute("vfModuleModelName", ""); - vfModuleMetaData0.getVfModuleModelDescription(); - vfModuleMetaData0.getVfModuleModelInvariantUUID(); - vfModuleMetaData0.getVfModuleModelCustomizationUUID(); - vfModuleMetaData0.getVfModuleModelInvariantUUID(); - vfModuleMetaData0.getProperties(); - vfModuleMetaData0.getProperties(); - vfModuleMetaData0.getVfModuleModelVersion(); - vfModuleMetaData0.getVfModuleModelCustomizationUUID(); - vfModuleMetaData0.getVfModuleModelName(); - // Undeclared exception! - try { - vfModuleMetaData0.isBase(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.asdc.installer.VfModuleMetaData", e); - } - } - - @Test(timeout = 4000) - public void test14() throws Throwable { - VfModuleMetaData vfModuleMetaData0 = new VfModuleMetaData(); - vfModuleMetaData0.setAttribute("vfModuleModelInvariantUUID", "vfModuleModelInvariantUUID"); - vfModuleMetaData0.setAttribute("vfModuleModelInvariantUUID", "vfModuleModelInvariantUUID"); - vfModuleMetaData0.getVfModuleModelUUID(); - vfModuleMetaData0.getVfModuleModelName(); - vfModuleMetaData0.getProperties(); - vfModuleMetaData0.setAttribute("k", "k"); - vfModuleMetaData0.getVfModuleModelInvariantUUID(); - vfModuleMetaData0.setAttribute("", (Object) null); - VfModuleMetaData vfModuleMetaData1 = new VfModuleMetaData(); - vfModuleMetaData1.getProperties(); - // Undeclared exception! - try { - vfModuleMetaData1.isBase(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.asdc.installer.VfModuleMetaData", e); - } - } - - @Test(timeout = 4000) - public void test15() throws Throwable { - VfModuleMetaData vfModuleMetaData0 = new VfModuleMetaData(); - vfModuleMetaData0.setAttribute("y&g B,yQlt!e=p`Q1", "y&g B,yQlt!e=p`Q1"); - vfModuleMetaData0.setAttribute("vfModuleModelCustomizationUUID", "vfModuleModelCustomizationUUID"); - vfModuleMetaData0.setAttribute("vfModuleModelCustomizationUUID", "vfModuleModelCustomizationUUID"); - vfModuleMetaData0.setAttribute("y&g B,yQlt!e=p`Q1", "vfModuleModelCustomizationUUID"); - vfModuleMetaData0.setAttribute("vfModuleModelCustomizationUUID", (Object) null); - vfModuleMetaData0.setAttribute("3m%.ng=pp5", "vfModuleModelCustomizationUUID"); - vfModuleMetaData0.getVfModuleModelInvariantUUID(); - vfModuleMetaData0.setAttribute((String) null, (Object) null); - vfModuleMetaData0.getVfModuleModelCustomizationUUID(); - vfModuleMetaData0.setAttribute((String) null, "vfModuleModelDescription"); - vfModuleMetaData0.getVfModuleModelCustomizationUUID(); - vfModuleMetaData0.setAttribute("n8'>kSe2Hv:m| ", "vfModuleModelCustomizationUUID"); - vfModuleMetaData0.getVfModuleModelUUID(); - vfModuleMetaData0.getVfModuleModelInvariantUUID(); - vfModuleMetaData0.getVfModuleModelName(); - vfModuleMetaData0.getVfModuleModelInvariantUUID(); - vfModuleMetaData0.getVfModuleModelVersion(); - String string0 = vfModuleMetaData0.getVfModuleModelVersion(); - assertNull(string0); - } - - @Test(timeout = 4000) - public void test16() throws Throwable { - VfModuleMetaData vfModuleMetaData0 = new VfModuleMetaData(); - vfModuleMetaData0.getVfModuleModelDescription(); - vfModuleMetaData0.setAttribute((String) null, (Object) null); - vfModuleMetaData0.getVfModuleModelName(); - vfModuleMetaData0.getVfModuleModelVersion(); - vfModuleMetaData0.setAttribute(".+7u)hv;7kUOz", (Object) null); - vfModuleMetaData0.getVfModuleModelCustomizationUUID(); - vfModuleMetaData0.getVfModuleModelInvariantUUID(); - String string0 = vfModuleMetaData0.getVfModuleModelUUID(); - assertNull(string0); - } - - @Test(timeout = 4000) - public void test17() throws Throwable { - VfModuleMetaData vfModuleMetaData0 = new VfModuleMetaData(); - String string0 = "$"; - vfModuleMetaData0.setAttribute("$", "$"); - vfModuleMetaData0.setAttribute("$", ""); - vfModuleMetaData0.setAttribute("", "$"); - // Undeclared exception! - try { - vfModuleMetaData0.isBase(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.asdc.installer.VfModuleMetaData", e); - } - } - - @Test(timeout = 4000) - public void test18() throws Throwable { - VfModuleMetaData vfModuleMetaData0 = new VfModuleMetaData(); - vfModuleMetaData0.getArtifacts(); - Map<String, String> map0 = vfModuleMetaData0.getProperties(); - assertEquals(0, map0.size()); - } -} diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleMetaDataESTestscaffolding.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleMetaDataESTestscaffolding.java deleted file mode 100644 index 39bb3a7227..0000000000 --- a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleMetaDataESTestscaffolding.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Scaffolding file used to store all the setups needed to run - * tests automatically generated by EvoSuite - * Fri Feb 24 16:02:34 GMT 2017 - */ - -package org.openecomp.mso.asdc.installer; - -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; -import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; - -@EvoSuiteClassExclude -public class VfModuleMetaDataESTestscaffolding { - - @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) 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.installer.VfModuleMetaData"; - 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 = SandboxMode.RECOMMENDED; - Sandbox.initializeSecurityManagerForSUT(); - org.evosuite.runtime.classhandling.JDKClassResetter.init(); - initializeClasses(); - org.evosuite.runtime.Runtime.getInstance().resetRuntime(); - } - - @AfterClass - public static void clearEvoSuiteFramework(){ - Sandbox.resetDefaultSecurityManager(); - System.setProperties((java.util.Properties) defaultProperties.clone()); - } - - @Before - public void initTestCase(){ - threadStopper.storeCurrentThreads(); - threadStopper.startRecordingTime(); - org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); - 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(); - Sandbox.doneWithExecutingSUTCode(); - org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); - org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); - } - - private static void initializeClasses() { - org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(VfModuleMetaDataESTestscaffolding.class.getClassLoader() , - "org.openecomp.mso.asdc.installer.VfModuleMetaData", - "org.openecomp.mso.asdc.installer.IVfModuleData" - ); - } - - private static void resetClasses() { - } -} diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleStructureESTest.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleStructureESTest.java deleted file mode 100644 index e63680b4c7..0000000000 --- a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleStructureESTest.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * This file was automatically generated by EvoSuite - * Fri Feb 24 13:34:51 GMT 2017 - */ - -package org.openecomp.mso.asdc.installer; - -import org.junit.Test; -import static org.junit.Assert.*; -import static org.evosuite.shaded.org.mockito.Mockito.*; -import static org.evosuite.runtime.MockitoExtension.*; -import static org.evosuite.runtime.EvoAssertions.*; -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.evosuite.runtime.EvoRunner; -import org.evosuite.runtime.EvoRunnerParameters; -import org.evosuite.runtime.ViolatedAssumptionAnswer; -import org.junit.runner.RunWith; -import org.openecomp.mso.asdc.installer.IVfModuleData; -import org.openecomp.mso.asdc.installer.VfModuleArtifact; -import org.openecomp.mso.asdc.installer.VfModuleStructure; -import org.openecomp.mso.asdc.installer.VfResourceStructure; -import org.openecomp.mso.db.catalog.beans.VfModule; -import org.openecomp.sdc.api.notification.INotificationData; -import org.openecomp.sdc.api.notification.IResourceInstance; - -@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) -public class VfModuleStructureESTest extends VfModuleStructureESTestscaffolding { - - @Test(timeout = 4000) - public void test0() throws Throwable { - LinkedList<String> linkedList0 = new LinkedList<String>(); - IVfModuleData iVfModuleData0 = mock(IVfModuleData.class, new ViolatedAssumptionAnswer()); - doReturn(linkedList0).when(iVfModuleData0).getArtifacts(); - VfModuleStructure vfModuleStructure0 = new VfModuleStructure((VfResourceStructure) null, iVfModuleData0); - VfModule vfModule0 = new VfModule(); - vfModule0.setIsBase(1); - vfModuleStructure0.setCatalogVfModule(vfModule0); - VfModule vfModule1 = vfModuleStructure0.getCatalogVfModule(); - assertNull(vfModule1.getModelInvariantUuid()); - } - - @Test(timeout = 4000) - public void test1() throws Throwable { - LinkedList<String> linkedList0 = new LinkedList<String>(); - IVfModuleData iVfModuleData0 = mock(IVfModuleData.class, new ViolatedAssumptionAnswer()); - doReturn(linkedList0).when(iVfModuleData0).getArtifacts(); - VfModuleStructure vfModuleStructure0 = new VfModuleStructure((VfResourceStructure) null, iVfModuleData0); - VfModule vfModule0 = new VfModule(); - vfModuleStructure0.setCatalogVfModule(vfModule0); - VfModule vfModule1 = vfModuleStructure0.getCatalogVfModule(); - assertNull(vfModule1.getModelVersion()); - } - @Test(timeout = 4000) - public void test4() throws Throwable { - LinkedList<String> linkedList0 = new LinkedList<String>(); - IVfModuleData iVfModuleData0 = mock(IVfModuleData.class, new ViolatedAssumptionAnswer()); - doReturn(linkedList0).when(iVfModuleData0).getArtifacts(); - VfModuleStructure vfModuleStructure0 = new VfModuleStructure((VfResourceStructure) null, iVfModuleData0); - Map<String, List<VfModuleArtifact>> map0 = vfModuleStructure0.getArtifactsMap(); - assertTrue(map0.isEmpty()); - } - - @Test(timeout = 4000) - public void test5() throws Throwable { - INotificationData iNotificationData0 = mock(INotificationData.class, new ViolatedAssumptionAnswer()); - IResourceInstance iResourceInstance0 = mock(IResourceInstance.class, new ViolatedAssumptionAnswer()); - VfResourceStructure vfResourceStructure0 = new VfResourceStructure(iNotificationData0, iResourceInstance0); - IVfModuleData iVfModuleData0 = mock(IVfModuleData.class, new ViolatedAssumptionAnswer()); - doReturn((List) null).when(iVfModuleData0).getArtifacts(); - VfModuleStructure vfModuleStructure0 = null; - try { - vfModuleStructure0 = new VfModuleStructure(vfResourceStructure0, iVfModuleData0); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.asdc.installer.VfModuleStructure", e); - } - } - - @Test(timeout = 4000) - public void test6() throws Throwable { - LinkedList<String> linkedList0 = new LinkedList<String>(); - IVfModuleData iVfModuleData0 = mock(IVfModuleData.class, new ViolatedAssumptionAnswer()); - doReturn(linkedList0).when(iVfModuleData0).getArtifacts(); - VfModuleStructure vfModuleStructure0 = new VfModuleStructure((VfResourceStructure) null, iVfModuleData0); - VfModule vfModule0 = vfModuleStructure0.getCatalogVfModule(); - assertNull(vfModule0); - } -} diff --git a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleStructureESTestscaffolding.java b/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleStructureESTestscaffolding.java deleted file mode 100644 index f6aa2ab5f2..0000000000 --- a/asdc-controller/src/test/java/org/openecomp/mso/asdc/installer/VfModuleStructureESTestscaffolding.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Scaffolding file used to store all the setups needed to run - * tests automatically generated by EvoSuite - * Fri Nov 25 13:37:00 GMT 2016 - */ - -package org.openecomp.mso.asdc.installer; - -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 VfModuleStructureESTestscaffolding { - - @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.installer.VfModuleStructure"; - 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(VfModuleStructureESTestscaffolding.class.getClassLoader() , - "org.openecomp.sdc.api.IDistributionClient", - "org.openecomp.mso.db.catalog.utils.MavenLikeVersioning", - "org.openecomp.mso.asdc.installer.VfResourceStructure", - "org.openecomp.mso.asdc.client.exceptions.ArtifactInstallerException", - "org.openecomp.mso.db.catalog.beans.VnfResource", - "org.openecomp.sdc.api.notification.IVfModuleMetadata", - "org.openecomp.mso.db.catalog.beans.VfModule", - "org.openecomp.sdc.api.results.IDistributionClientResult", - "org.openecomp.sdc.api.notification.IArtifactInfo", - "org.openecomp.mso.db.catalog.beans.Service", - "org.openecomp.mso.asdc.installer.VfModuleStructure", - "org.openecomp.sdc.api.notification.INotificationData", - "org.openecomp.mso.asdc.installer.VfModuleArtifact", - "org.openecomp.sdc.api.notification.IResourceInstance", - "org.openecomp.sdc.api.results.IDistributionClientDownloadResult" - ); - } - - private static void resetClasses() { - org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(VfModuleStructureESTestscaffolding.class.getClassLoader()); - - org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( - "org.openecomp.mso.asdc.client.exceptions.ArtifactInstallerException" - ); - } -} |