blob: 741872af7a4cc744cb2e9868bdaf9f5a3eccdb30 (
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:30:51 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 ReadFileTaskESTest extends ReadFileTaskESTestscaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
ReadFileTask readFileTask0 = new ReadFileTask();
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<ReadFileTask>) ReadFileTask.class, readFileTask0, "inputVariable", (Object) expression0);
try {
readFileTask0.execute(executionImpl0);
fail("Expecting exception: RuntimeException");
} catch(RuntimeException e) {
//
// ReadFileTask injected field 'inputVariable' is bad: required field has null value
//
verifyException("org.openecomp.mso.bpmn.core.BaseTask", e);
}
}
@Test(timeout = 4000)
public void test1() throws Throwable {
ReadFileTask readFileTask0 = new ReadFileTask();
ExecutionImpl executionImpl0 = new ExecutionImpl();
try {
readFileTask0.execute(executionImpl0);
fail("Expecting exception: RuntimeException");
} catch(RuntimeException e) {
//
// ReadFileTask injected field 'inputVariable' is bad: missing required field
//
verifyException("org.openecomp.mso.bpmn.core.BaseTask", e);
}
}
}
|