diff options
Diffstat (limited to 'adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils')
5 files changed, 0 insertions, 976 deletions
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentEntryESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentEntryESTest.java deleted file mode 100644 index 6eaac45a43..0000000000 --- a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentEntryESTest.java +++ /dev/null @@ -1,562 +0,0 @@ -/* - * This file was automatically generated by EvoSuite - * Mon Nov 14 08:40:12 GMT 2016 - */ - -package org.openecomp.mso.openstack.utils; - -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.openecomp.mso.db.catalog.beans.HeatTemplateParam; - -import java.util.LinkedHashSet; -import java.util.Set; -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 MsoHeatEnvironmentEntryESTest { - - @Test(timeout = 4000) - public void test00() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - Set<MsoHeatEnvironmentResource> set0 = (Set<MsoHeatEnvironmentResource>) mock(Set.class, new ViolatedAssumptionAnswer()); - doReturn((-237540137)).when(set0).size(); - msoHeatEnvironmentEntry0.setResources(set0); - boolean boolean0 = msoHeatEnvironmentEntry0.hasResources(); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - assertFalse(boolean0); - } - - @Test(timeout = 4000) - public void test01() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - PrivateAccess.setVariable((Class<MsoHeatEnvironmentEntry>) MsoHeatEnvironmentEntry.class, msoHeatEnvironmentEntry0, "valid", (Object) false); - boolean boolean0 = msoHeatEnvironmentEntry0.isValid(); - assertFalse(boolean0); - } - - @Test(timeout = 4000) - public void test02() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - LinkedHashSet<MsoHeatEnvironmentResource> linkedHashSet0 = new LinkedHashSet<MsoHeatEnvironmentResource>(); - msoHeatEnvironmentEntry0.setResources(linkedHashSet0); - msoHeatEnvironmentEntry0.getResources(); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } - - @Test(timeout = 4000) - public void test03() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource("9>KEckx", "8&T!e[SABZ"); - msoHeatEnvironmentEntry0.addResource(msoHeatEnvironmentResource0); - msoHeatEnvironmentEntry0.getResources(); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } - - @Test(timeout = 4000) - public void test04() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - StringBuilder stringBuilder0 = msoHeatEnvironmentEntry0.toFullString(); - PrivateAccess.setVariable((Class<MsoHeatEnvironmentEntry>) MsoHeatEnvironmentEntry.class, msoHeatEnvironmentEntry0, "rawEntry", (Object) stringBuilder0); - StringBuilder stringBuilder1 = msoHeatEnvironmentEntry0.getRawEntry(); - assertEquals("\nnull", stringBuilder1.toString()); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } - - @Test(timeout = 4000) - public void test05() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - LinkedHashSet<MsoHeatEnvironmentParameter> linkedHashSet0 = new LinkedHashSet<MsoHeatEnvironmentParameter>(); - msoHeatEnvironmentEntry0.setParameters(linkedHashSet0); - msoHeatEnvironmentEntry0.getParameters(); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } - - @Test(timeout = 4000) - public void test06() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter(); - msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter0); - msoHeatEnvironmentEntry0.getParameters(); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } - - @Test(timeout = 4000) - public void test07() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - LinkedHashSet<MsoHeatEnvironmentResource> linkedHashSet0 = new LinkedHashSet<MsoHeatEnvironmentResource>(); - msoHeatEnvironmentEntry0.setResources(linkedHashSet0); - msoHeatEnvironmentEntry0.getNumberOfResources(); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } - - @Test(timeout = 4000) - public void test08() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource(); - msoHeatEnvironmentEntry0.addResource(msoHeatEnvironmentResource0); - msoHeatEnvironmentEntry0.getNumberOfResources(); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } - - @Test(timeout = 4000) - public void test09() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - Set<MsoHeatEnvironmentResource> set0 = (Set<MsoHeatEnvironmentResource>) mock(Set.class, new ViolatedAssumptionAnswer()); - doReturn(0).when(set0).size(); - msoHeatEnvironmentEntry0.setResources(set0); - msoHeatEnvironmentEntry0.getNumberOfResources(); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } - - @Test(timeout = 4000) - public void test10() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - LinkedHashSet<MsoHeatEnvironmentParameter> linkedHashSet0 = new LinkedHashSet<MsoHeatEnvironmentParameter>(); - msoHeatEnvironmentEntry0.setParameters(linkedHashSet0); - msoHeatEnvironmentEntry0.getNumberOfParameters(); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } - - @Test(timeout = 4000) - public void test11() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter(); - msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter0); - msoHeatEnvironmentEntry0.getNumberOfParameters(); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } - - @Test(timeout = 4000) - public void test12() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - PrivateAccess.setVariable((Class<MsoHeatEnvironmentEntry>) MsoHeatEnvironmentEntry.class, msoHeatEnvironmentEntry0, "errorString", (Object) "Param="); - msoHeatEnvironmentEntry0.getErrorString(); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } - - @Test(timeout = 4000) - public void test13() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - Set<HeatTemplateParam> set0 = (Set<HeatTemplateParam>) mock(Set.class, new ViolatedAssumptionAnswer()); - doReturn((-2945)).when(set0).size(); - // Undeclared exception! - try { - msoHeatEnvironmentEntry0.toFullStringExcludeNonParams(set0); - fail("Expecting exception: IllegalArgumentException"); - - } catch(IllegalArgumentException e) { - // - // Illegal Capacity: -2945 - // - verifyException("java.util.ArrayList", e); - } - } - - @Test(timeout = 4000) - public void test14() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - LinkedHashSet<MsoHeatEnvironmentParameter> linkedHashSet0 = new LinkedHashSet<MsoHeatEnvironmentParameter>(); - linkedHashSet0.add((MsoHeatEnvironmentParameter) null); - msoHeatEnvironmentEntry0.setParameters(linkedHashSet0); - // Undeclared exception! - try { - msoHeatEnvironmentEntry0.toFullString(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.openstack.utils.MsoHeatEnvironmentEntry", e); - } - } - - @Test(timeout = 4000) - public void test15() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter(); - msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter0); - // Undeclared exception! - try { - msoHeatEnvironmentEntry0.containsParameter((String) null, ""); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.openstack.utils.MsoHeatEnvironmentParameter", e); - } - } - - @Test(timeout = 4000) - public void test16() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - LinkedHashSet<MsoHeatEnvironmentParameter> linkedHashSet0 = new LinkedHashSet<MsoHeatEnvironmentParameter>(); - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter(); - linkedHashSet0.add(msoHeatEnvironmentParameter0); - msoHeatEnvironmentEntry0.setParameters(linkedHashSet0); - // Undeclared exception! - try { - msoHeatEnvironmentEntry0.containsParameter((String) null); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.openstack.utils.MsoHeatEnvironmentParameter", e); - } - } - - @Test(timeout = 4000) - public void test17() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource(); - msoHeatEnvironmentEntry0.addResource(msoHeatEnvironmentResource0); - MsoHeatEnvironmentResource msoHeatEnvironmentResource1 = new MsoHeatEnvironmentResource(); - // Undeclared exception! - try { - msoHeatEnvironmentEntry0.addResource(msoHeatEnvironmentResource1); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.openstack.utils.MsoHeatEnvironmentResource", e); - } - } - - @Test(timeout = 4000) - public void test18() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter(); - msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter0); - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter1 = new MsoHeatEnvironmentParameter(); - // Undeclared exception! - try { - msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter1); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.openstack.utils.MsoHeatEnvironmentParameter", e); - } - } - - @Test(timeout = 4000) - public void test19() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter("", ""); - msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter0); - boolean boolean0 = msoHeatEnvironmentEntry0.containsParameter(""); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - assertTrue(boolean0); - } - - @Test(timeout = 4000) - public void test20() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter(); - msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter0); - boolean boolean0 = msoHeatEnvironmentEntry0.hasParameters(); - assertTrue(boolean0); - } - - @Test(timeout = 4000) - public void test21() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - msoHeatEnvironmentEntry0.hasParameters(); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } - - @Test(timeout = 4000) - public void test22() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - LinkedHashSet<MsoHeatEnvironmentParameter> linkedHashSet0 = new LinkedHashSet<MsoHeatEnvironmentParameter>(); - msoHeatEnvironmentEntry0.setParameters(linkedHashSet0); - boolean boolean0 = msoHeatEnvironmentEntry0.hasParameters(); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - assertFalse(boolean0); - } - - @Test(timeout = 4000) - public void test23() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - PrivateAccess.callMethod((Class<MsoHeatEnvironmentEntry>) MsoHeatEnvironmentEntry.class, msoHeatEnvironmentEntry0, "getResourceRegistryRawEntry"); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } - - @Test(timeout = 4000) - public void test24() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>(); - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter(); - msoHeatEnvironmentParameter0.setValue("_BAD"); - HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam(); - linkedHashSet0.add(heatTemplateParam0); - msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter0); - msoHeatEnvironmentEntry0.toFullStringExcludeNonParams(linkedHashSet0); - assertTrue(msoHeatEnvironmentEntry0.hasParameters()); - } - - @Test(timeout = 4000) - public void test25() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>(); - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter(); - msoHeatEnvironmentParameter0.setValue("t'N`.KI:L9"); - HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam(); - linkedHashSet0.add(heatTemplateParam0); - msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter0); - msoHeatEnvironmentEntry0.toFullStringExcludeNonParams(linkedHashSet0); - assertTrue(msoHeatEnvironmentEntry0.hasParameters()); - } - - @Test(timeout = 4000) - public void test26() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>(); - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter(); - HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam(); - linkedHashSet0.add(heatTemplateParam0); - msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter0); - // Undeclared exception! - try { - msoHeatEnvironmentEntry0.toFullStringExcludeNonParams(linkedHashSet0); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - } - } - - @Test(timeout = 4000) - public void test27() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter(""); - msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter0); - LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>(); - msoHeatEnvironmentEntry0.toFullStringExcludeNonParams(linkedHashSet0); - assertTrue(msoHeatEnvironmentEntry0.hasParameters()); - } - - @Test(timeout = 4000) - public void test28() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>(); - HeatTemplateParam heatTemplateParam0 = new HeatTemplateParam(); - linkedHashSet0.add(heatTemplateParam0); - msoHeatEnvironmentEntry0.toFullStringExcludeNonParams(linkedHashSet0); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } - - @Test(timeout = 4000) - public void test29() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - assertFalse(msoHeatEnvironmentEntry0.hasParameters()); - - LinkedHashSet<HeatTemplateParam> linkedHashSet0 = new LinkedHashSet<HeatTemplateParam>(); - StringBuilder stringBuilder0 = msoHeatEnvironmentEntry0.toFullStringExcludeNonParams(linkedHashSet0); - PrivateAccess.setVariable((Class<MsoHeatEnvironmentEntry>) MsoHeatEnvironmentEntry.class, msoHeatEnvironmentEntry0, "rawEntry", (Object) stringBuilder0); - StringBuilder stringBuilder1 = (StringBuilder)PrivateAccess.callMethod((Class<MsoHeatEnvironmentEntry>) MsoHeatEnvironmentEntry.class, msoHeatEnvironmentEntry0, "getResourceRegistryRawEntry"); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - assertNull(stringBuilder1); - } - - @Test(timeout = 4000) - public void test30() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter(""); - msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter0); - boolean boolean0 = msoHeatEnvironmentEntry0.containsParameter("9MTP2Qt0FH.^", ""); - assertTrue(boolean0); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } - - @Test(timeout = 4000) - public void test31() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - boolean boolean0 = msoHeatEnvironmentEntry0.containsParameter("dP:* hj", "dP:* hj"); - assertFalse(boolean0); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } - - @Test(timeout = 4000) - public void test32() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter(""); - msoHeatEnvironmentEntry0.addParameter(msoHeatEnvironmentParameter0); - boolean boolean0 = msoHeatEnvironmentEntry0.containsParameter("", ""); - assertTrue(boolean0); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } - - @Test(timeout = 4000) - public void test33() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - LinkedHashSet<MsoHeatEnvironmentParameter> linkedHashSet0 = new LinkedHashSet<MsoHeatEnvironmentParameter>(); - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = mock(MsoHeatEnvironmentParameter.class, new ViolatedAssumptionAnswer()); - linkedHashSet0.add(msoHeatEnvironmentParameter0); - msoHeatEnvironmentEntry0.setParameters(linkedHashSet0); - boolean boolean0 = msoHeatEnvironmentEntry0.containsParameter("kz`LZx"); - assertTrue(msoHeatEnvironmentEntry0.hasParameters()); - assertFalse(boolean0); - } - - @Test(timeout = 4000) - public void test34() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - LinkedHashSet<MsoHeatEnvironmentParameter> linkedHashSet0 = new LinkedHashSet<MsoHeatEnvironmentParameter>(); - msoHeatEnvironmentEntry0.setParameters(linkedHashSet0); - boolean boolean0 = msoHeatEnvironmentEntry0.containsParameter("kz`LZx"); - assertFalse(boolean0); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } - - @Test(timeout = 4000) - public void test35() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - boolean boolean0 = msoHeatEnvironmentEntry0.containsParameter(",=?%4z"); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - assertFalse(boolean0); - } - - @Test(timeout = 4000) - public void test36() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - LinkedHashSet<MsoHeatEnvironmentParameter> linkedHashSet0 = new LinkedHashSet<MsoHeatEnvironmentParameter>(); - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = mock(MsoHeatEnvironmentParameter.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(msoHeatEnvironmentParameter0).getName(); - doReturn((String) null).when(msoHeatEnvironmentParameter0).getValue(); - linkedHashSet0.add(msoHeatEnvironmentParameter0); - msoHeatEnvironmentEntry0.setParameters(linkedHashSet0); - msoHeatEnvironmentEntry0.toFullString(); - assertTrue(msoHeatEnvironmentEntry0.hasParameters()); - } - - @Test(timeout = 4000) - public void test37() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource(""); - msoHeatEnvironmentEntry0.addResource(msoHeatEnvironmentResource0); - boolean boolean0 = msoHeatEnvironmentEntry0.hasResources(); - assertTrue(boolean0); - } - - @Test(timeout = 4000) - public void test38() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - Set<MsoHeatEnvironmentResource> set0 = (Set<MsoHeatEnvironmentResource>) mock(Set.class, new ViolatedAssumptionAnswer()); - doReturn(0).when(set0).size(); - msoHeatEnvironmentEntry0.setResources(set0); - boolean boolean0 = msoHeatEnvironmentEntry0.hasResources(); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - assertFalse(boolean0); - } - - @Test(timeout = 4000) - public void test39() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - boolean boolean0 = msoHeatEnvironmentEntry0.hasResources(); - assertFalse(boolean0); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } - - @Test(timeout = 4000) - public void test40() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - msoHeatEnvironmentEntry0.setResources((Set<MsoHeatEnvironmentResource>) null); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } - - @Test(timeout = 4000) - public void test41() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - msoHeatEnvironmentEntry0.setParameters((Set<MsoHeatEnvironmentParameter>) null); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } - - - @Test(timeout = 4000) - public void test43() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - // Undeclared exception! - try { - msoHeatEnvironmentEntry0.getNumberOfResources(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.openstack.utils.MsoHeatEnvironmentEntry", e); - } - } - - @Test(timeout = 4000) - public void test44() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - boolean boolean0 = msoHeatEnvironmentEntry0.isValid(); - assertTrue(boolean0); - } - - @Test(timeout = 4000) - public void test45() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry((StringBuilder) null); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } - - @Test(timeout = 4000) - public void test46() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - // Undeclared exception! - try { - msoHeatEnvironmentEntry0.getNumberOfParameters(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.openecomp.mso.openstack.utils.MsoHeatEnvironmentEntry", e); - } - } - - @Test(timeout = 4000) - public void test47() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - msoHeatEnvironmentEntry0.getRawEntry(); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } - - @Test(timeout = 4000) - public void test48() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - msoHeatEnvironmentEntry0.getParameters(); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } - - @Test(timeout = 4000) - public void test49() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - msoHeatEnvironmentEntry0.getResources(); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } - - @Test(timeout = 4000) - public void test50() throws Throwable { - MsoHeatEnvironmentEntry msoHeatEnvironmentEntry0 = new MsoHeatEnvironmentEntry(); - msoHeatEnvironmentEntry0.getErrorString(); - assertTrue(msoHeatEnvironmentEntry0.isValid()); - } -} diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentParameterESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentParameterESTest.java deleted file mode 100644 index 6ec389b809..0000000000 --- a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentParameterESTest.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * This file was automatically generated by EvoSuite - * Mon Nov 14 08:45:40 GMT 2016 - */ - -package org.openecomp.mso.openstack.utils; - -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 MsoHeatEnvironmentParameterESTest extends MsoHeatEnvironmentParameterESTestscaffolding { - - @Test(timeout = 4000) - public void test00() throws Throwable { - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter(); - msoHeatEnvironmentParameter0.hashCode(); - } - - @Test(timeout = 4000) - public void test01() throws Throwable { - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter(""); - boolean boolean0 = msoHeatEnvironmentParameter0.equals(msoHeatEnvironmentParameter0); - assertTrue(boolean0); - } - - @Test(timeout = 4000) - public void test02() throws Throwable { - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter(""); - msoHeatEnvironmentParameter0.setValue(""); - String string0 = msoHeatEnvironmentParameter0.getValue(); - assertEquals("", string0); - } - - @Test(timeout = 4000) - public void test03() throws Throwable { - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter(); - String string0 = msoHeatEnvironmentParameter0.getName(); - assertNull(string0); - } - - @Test(timeout = 4000) - public void test04() throws Throwable { - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter("<*+ogA@v;MO4'8{1"); - String string0 = msoHeatEnvironmentParameter0.getName(); - assertEquals("<*+ogA@v;MO4'8{1", string0); - } - - @Test(timeout = 4000) - public void test05() throws Throwable { - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter(""); - String string0 = msoHeatEnvironmentParameter0.getName(); - assertEquals("", string0); - } - - @Test(timeout = 4000) - public void test06() throws Throwable { - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter("", "-3Y=_MqzpVL7|^$8"); - String string0 = msoHeatEnvironmentParameter0.getValue(); - assertEquals("-3Y=_MqzpVL7|^$8", string0); - } - - @Test(timeout = 4000) - public void test07() throws Throwable { - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter(""); - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter1 = new MsoHeatEnvironmentParameter("{Ox?zu\"*"); - boolean boolean0 = msoHeatEnvironmentParameter1.equals(msoHeatEnvironmentParameter0); - assertFalse(boolean0); - } - - @Test(timeout = 4000) - public void test08() throws Throwable { - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter("?.@!au:}y7xGSg|}8"); - boolean boolean0 = msoHeatEnvironmentParameter0.equals("?.@!au:}y7xGSg|}8"); - assertFalse(boolean0); - } - - @Test(timeout = 4000) - public void test09() throws Throwable { - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter(""); - msoHeatEnvironmentParameter0.setName(""); - assertEquals("", msoHeatEnvironmentParameter0.getName()); - } - - @Test(timeout = 4000) - public void test10() throws Throwable { - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter(""); - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter1 = new MsoHeatEnvironmentParameter(""); - boolean boolean0 = msoHeatEnvironmentParameter0.equals(msoHeatEnvironmentParameter1); - assertTrue(boolean0); - } - - @Test(timeout = 4000) - public void test11() throws Throwable { - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter(""); - String string0 = msoHeatEnvironmentParameter0.getValue(); - assertNull(string0); - } - - @Test(timeout = 4000) - public void test12() throws Throwable { - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter(""); - msoHeatEnvironmentParameter0.hashCode(); - } - - @Test(timeout = 4000) - public void test13() throws Throwable { - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter(); - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter1 = new MsoHeatEnvironmentParameter(); - // Undeclared exception! - try { - msoHeatEnvironmentParameter0.equals(msoHeatEnvironmentParameter1); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - } - } - - @Test(timeout = 4000) - public void test14() throws Throwable { - MsoHeatEnvironmentParameter msoHeatEnvironmentParameter0 = new MsoHeatEnvironmentParameter(""); - String string0 = msoHeatEnvironmentParameter0.toString(); - assertEquals(": null", string0); - } -} diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentParameterESTestscaffolding.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentParameterESTestscaffolding.java deleted file mode 100644 index f7e33bb8ce..0000000000 --- a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentParameterESTestscaffolding.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Scaffolding file used to store all the setups needed to run - * tests automatically generated by EvoSuite - * Mon Nov 14 08:45:40 GMT 2016 - */ - -package org.openecomp.mso.openstack.utils; - -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 MsoHeatEnvironmentParameterESTestscaffolding { - - @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.openstack.utils.MsoHeatEnvironmentParameter"; - 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(MsoHeatEnvironmentParameterESTestscaffolding.class.getClassLoader() , - "org.openecomp.mso.openstack.utils.MsoHeatEnvironmentParameter" - ); - } - - private static void resetClasses() { - } -} diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentResourceESTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentResourceESTest.java deleted file mode 100644 index d3e7d29717..0000000000 --- a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentResourceESTest.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * This file was automatically generated by EvoSuite - * Mon Nov 14 08:45:54 GMT 2016 - */ - -package org.openecomp.mso.openstack.utils; - -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 MsoHeatEnvironmentResourceESTest extends MsoHeatEnvironmentResourceESTestscaffolding { - - @Test(timeout = 4000) - public void test00() throws Throwable { - MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource("", ""); - msoHeatEnvironmentResource0.hashCode(); - } - - @Test(timeout = 4000) - public void test01() throws Throwable { - MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource("8{,8]8v", "8{,8]8v"); - String string0 = msoHeatEnvironmentResource0.getValue(); - assertEquals("8{,8]8v", string0); - } - - @Test(timeout = 4000) - public void test02() throws Throwable { - MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource("", ""); - String string0 = msoHeatEnvironmentResource0.getValue(); - assertEquals("", string0); - } - - @Test(timeout = 4000) - public void test03() throws Throwable { - MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource("\"(_{*)._$D2+w8wk"); - String string0 = msoHeatEnvironmentResource0.getName(); - assertEquals("\"(_{*)._$D2+w8wk", string0); - } - - @Test(timeout = 4000) - public void test04() throws Throwable { - MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource(); - MsoHeatEnvironmentResource msoHeatEnvironmentResource1 = new MsoHeatEnvironmentResource(); - // Undeclared exception! - try { - msoHeatEnvironmentResource0.equals(msoHeatEnvironmentResource1); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - } - } - - @Test(timeout = 4000) - public void test05() throws Throwable { - MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource("", ""); - MsoHeatEnvironmentResource msoHeatEnvironmentResource1 = new MsoHeatEnvironmentResource("", ""); - boolean boolean0 = msoHeatEnvironmentResource0.equals(msoHeatEnvironmentResource1); - assertTrue(boolean0); - } - - @Test(timeout = 4000) - public void test06() throws Throwable { - MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource("m"); - MsoHeatEnvironmentResource msoHeatEnvironmentResource1 = new MsoHeatEnvironmentResource("l", "l"); - boolean boolean0 = msoHeatEnvironmentResource0.equals(msoHeatEnvironmentResource1); - assertFalse(boolean0); - } - - @Test(timeout = 4000) - public void test07() throws Throwable { - MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource(); - boolean boolean0 = msoHeatEnvironmentResource0.equals("1Z^#74OJV(OBf<=#r"); - assertFalse(boolean0); - } - - @Test(timeout = 4000) - public void test08() throws Throwable { - MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource(); - boolean boolean0 = msoHeatEnvironmentResource0.equals(msoHeatEnvironmentResource0); - assertTrue(boolean0); - } - - @Test(timeout = 4000) - public void test09() throws Throwable { - MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource(); - String string0 = msoHeatEnvironmentResource0.getName(); - assertNull(string0); - } - - @Test(timeout = 4000) - public void test10() throws Throwable { - MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource(); - msoHeatEnvironmentResource0.setName(""); - String string0 = msoHeatEnvironmentResource0.getName(); - assertEquals("", string0); - } - - @Test(timeout = 4000) - public void test11() throws Throwable { - MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource(""); - String string0 = msoHeatEnvironmentResource0.getValue(); - assertNull(string0); - } - - @Test(timeout = 4000) - public void test12() throws Throwable { - MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource(); - msoHeatEnvironmentResource0.hashCode(); - } - - @Test(timeout = 4000) - public void test13() throws Throwable { - MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource(); - String string0 = msoHeatEnvironmentResource0.toString(); - assertEquals("\"null\": null", string0); - } - - @Test(timeout = 4000) - public void test14() throws Throwable { - MsoHeatEnvironmentResource msoHeatEnvironmentResource0 = new MsoHeatEnvironmentResource(); - msoHeatEnvironmentResource0.setValue(""); - assertNull(msoHeatEnvironmentResource0.getName()); - } -} diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentResourceESTestscaffolding.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentResourceESTestscaffolding.java deleted file mode 100644 index 3917b8904c..0000000000 --- a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentResourceESTestscaffolding.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Scaffolding file used to store all the setups needed to run - * tests automatically generated by EvoSuite - * Mon Nov 14 08:45:54 GMT 2016 - */ - -package org.openecomp.mso.openstack.utils; - -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 MsoHeatEnvironmentResourceESTestscaffolding { - - @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.openstack.utils.MsoHeatEnvironmentResource"; - 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(MsoHeatEnvironmentResourceESTestscaffolding.class.getClassLoader() , - "org.openecomp.mso.openstack.utils.MsoHeatEnvironmentResource" - ); - } - - private static void resetClasses() { - } -} |