diff options
Diffstat (limited to 'bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db')
4 files changed, 295 insertions, 0 deletions
diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTest.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTest.java new file mode 100644 index 0000000000..c7b241c2d5 --- /dev/null +++ b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTest.java @@ -0,0 +1,86 @@ +/* + * This file was automatically generated by EvoSuite + * Mon Nov 14 13:48:50 GMT 2016 + */ + +package com.att.camunda.bpm.plugin.urnmap.db; + +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 URNDataESTest extends URNDataESTestscaffolding { + + @Test(timeout = 4000) + public void test0() throws Throwable { + URNData uRNData0 = new URNData(); + uRNData0.setVer_("yE)"); + String string0 = uRNData0.getVer_(); + assertEquals("yE)", string0); + } + + @Test(timeout = 4000) + public void test1() throws Throwable { + URNData uRNData0 = new URNData(); + uRNData0.setURNValue("Dw]M@,~.D"); + String string0 = uRNData0.getURNValue(); + assertEquals("Dw]M@,~.D", string0); + } + + @Test(timeout = 4000) + public void test2() throws Throwable { + URNData uRNData0 = new URNData(); + uRNData0.setURNName(""); + String string0 = uRNData0.getURNName(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test3() throws Throwable { + URNData uRNData0 = new URNData(); + String string0 = uRNData0.getVer_(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test4() throws Throwable { + URNData uRNData0 = new URNData(); + String string0 = uRNData0.getURNValue(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test5() throws Throwable { + URNData uRNData0 = new URNData(); + String string0 = uRNData0.getURNName(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test6() throws Throwable { + URNData uRNData0 = new URNData(); + uRNData0.setURNValue(""); + String string0 = uRNData0.getURNValue(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test7() throws Throwable { + URNData uRNData0 = new URNData(); + uRNData0.setVer_(""); + String string0 = uRNData0.getVer_(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test8() throws Throwable { + URNData uRNData0 = new URNData(); + uRNData0.setURNName("2Gv9h[mmV=,z\"VSY`t)"); + String string0 = uRNData0.getURNName(); + assertEquals("2Gv9h[mmV=,z\"VSY`t)", string0); + } +} diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTestscaffolding.java new file mode 100644 index 0000000000..7ae4fabb38 --- /dev/null +++ b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTestscaffolding.java @@ -0,0 +1,78 @@ +/** + * Scaffolding file used to store all the setups needed to run + * tests automatically generated by EvoSuite + * Mon Nov 14 13:48:50 GMT 2016 + */ + +package com.att.camunda.bpm.plugin.urnmap.db; + +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 URNDataESTestscaffolding { + + @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 = "com.att.camunda.bpm.plugin.urnmap.db.URNData"; + 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(URNDataESTestscaffolding.class.getClassLoader() , + "com.att.camunda.bpm.plugin.urnmap.db.URNData" + ); + } + + private static void resetClasses() { + } +} diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTest.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTest.java new file mode 100644 index 0000000000..9c71cdebf3 --- /dev/null +++ b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTest.java @@ -0,0 +1,34 @@ +/* + * This file was automatically generated by EvoSuite + * Mon Nov 14 13:47:07 GMT 2016 + */ + +package com.att.camunda.bpm.plugin.urnmap.db; + +import org.junit.Test; +import static org.junit.Assert.*; +import static org.evosuite.runtime.EvoAssertions.*; + +import org.evosuite.runtime.EvoRunner; +import org.evosuite.runtime.EvoRunnerParameters; +import org.junit.runner.RunWith; + +@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) +public class URNServiceESTest extends URNServiceESTestscaffolding { + + @Test(timeout = 4000) + public void test0() throws Throwable { + URNService uRNService0 = new URNService(); + // Undeclared exception! + try { + uRNService0.getProperties(); + fail("Expecting exception: NullPointerException"); + + } catch(NullPointerException e) { + // + // no message in exception (getMessage() returned null) + // + verifyException("com.att.camunda.bpm.plugin.urnmap.db.URNService", e); + } + } +} diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTestscaffolding.java new file mode 100644 index 0000000000..d6ce3f31b4 --- /dev/null +++ b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTestscaffolding.java @@ -0,0 +1,97 @@ +/** + * Scaffolding file used to store all the setups needed to run + * tests automatically generated by EvoSuite + * Mon Nov 14 13:47:07 GMT 2016 + */ + +package com.att.camunda.bpm.plugin.urnmap.db; + +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 URNServiceESTestscaffolding { + + @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 = "com.att.camunda.bpm.plugin.urnmap.db.URNService"; + 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(URNServiceESTestscaffolding.class.getClassLoader() , + "org.camunda.bpm.engine.ProcessEngineException", + "com.att.camunda.bpm.plugin.urnmap.db.URNService", + "org.camunda.bpm.engine.impl.interceptor.Command", + "org.camunda.bpm.engine.ClassLoadingException", + "org.camunda.bpm.engine.ProcessEngine", + "org.camunda.bpm.engine.ProcessEngines", + "org.camunda.bpm.engine.ProcessEngineInfo", + "org.camunda.bpm.application.ProcessApplicationUnavailableException", + "org.camunda.bpm.engine.impl.ProcessEngineImpl", + "org.camunda.bpm.engine.impl.context.Context", + "org.camunda.bpm.engine.impl.util.ReflectUtil", + "org.camunda.bpm.engine.ProcessEngineServices", + "com.att.camunda.bpm.plugin.urnmap.db.URNData" + ); + } + + private static void resetClasses() { + org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNServiceESTestscaffolding.class.getClassLoader()); + + org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( + "org.camunda.bpm.engine.impl.context.Context", + "org.camunda.bpm.engine.ProcessEngines", + "org.camunda.bpm.engine.impl.util.ReflectUtil" + ); + } +} |