blob: 6422685f92908ae5494ee35b2f735fc5c1653125 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
/*
* This file was automatically generated by EvoSuite
* Mon Nov 14 11:29:36 GMT 2016
*/
package org.openecomp.mso.bpmn.core;
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.camunda.bpm.engine.delegate.Expression;
import org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl;
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 ReadConfigTaskESTest extends ReadConfigTaskESTestscaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
ReadConfigTask readConfigTask0 = new ReadConfigTask();
ExecutionImpl executionImpl0 = new ExecutionImpl();
Expression expression0 = mock(Expression.class, new ViolatedAssumptionAnswer());
doReturn((Object) null).when(expression0).getValue(any(org.camunda.bpm.engine.delegate.VariableScope.class));
PrivateAccess.setVariable((Class<ReadConfigTask>) ReadConfigTask.class, readConfigTask0, "propertiesFile", (Object) expression0);
try {
readConfigTask0.execute(executionImpl0);
fail("Expecting exception: RuntimeException");
} catch(RuntimeException e) {
//
// ReadConfigTask injected field 'propertiesFile' is bad: required field has null value
//
verifyException("org.openecomp.mso.bpmn.core.BaseTask", e);
}
}
@Test(timeout = 4000)
public void test1() throws Throwable {
ReadConfigTask readConfigTask0 = new ReadConfigTask();
ExecutionImpl executionImpl0 = new ExecutionImpl();
try {
readConfigTask0.execute(executionImpl0);
fail("Expecting exception: RuntimeException");
} catch(RuntimeException e) {
//
// ReadConfigTask injected field 'propertiesFile' is bad: missing required field
//
verifyException("org.openecomp.mso.bpmn.core.BaseTask", e);
}
}
}
|