741872af7a4cc744cb2e9868bdaf9f5a3eccdb30
[so.git] / bpmn / MSOCoreBPMN / src / test / java / org / openecomp / mso / bpmn / core / ReadFileTaskESTest.java
1 /*
2  * This file was automatically generated by EvoSuite
3  * Mon Nov 14 11:30:51 GMT 2016
4  */
5
6 package org.openecomp.mso.bpmn.core;
7
8 import org.junit.Test;
9 import static org.junit.Assert.*;
10 import static org.evosuite.shaded.org.mockito.Mockito.*;
11 import static org.evosuite.runtime.EvoAssertions.*;
12
13 import org.camunda.bpm.engine.delegate.Expression;
14 import org.camunda.bpm.engine.impl.pvm.runtime.ExecutionImpl;
15 import org.evosuite.runtime.EvoRunner;
16 import org.evosuite.runtime.EvoRunnerParameters;
17 import org.evosuite.runtime.PrivateAccess;
18 import org.evosuite.runtime.ViolatedAssumptionAnswer;
19 import org.junit.runner.RunWith;
20
21 @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
22 public class ReadFileTaskESTest extends ReadFileTaskESTestscaffolding {
23
24   @Test(timeout = 4000)
25   public void test0()  throws Throwable  {
26       ReadFileTask readFileTask0 = new ReadFileTask();
27       ExecutionImpl executionImpl0 = new ExecutionImpl();
28       Expression expression0 = mock(Expression.class, new ViolatedAssumptionAnswer());
29       doReturn((Object) null).when(expression0).getValue(any(org.camunda.bpm.engine.delegate.VariableScope.class));
30       PrivateAccess.setVariable((Class<ReadFileTask>) ReadFileTask.class, readFileTask0, "inputVariable", (Object) expression0);
31       try { 
32         readFileTask0.execute(executionImpl0);
33         fail("Expecting exception: RuntimeException");
34       
35       } catch(RuntimeException e) {
36          //
37          // ReadFileTask injected field 'inputVariable' is bad: required field has null value
38          //
39          verifyException("org.openecomp.mso.bpmn.core.BaseTask", e);
40       }
41   }
42
43   @Test(timeout = 4000)
44   public void test1()  throws Throwable  {
45       ReadFileTask readFileTask0 = new ReadFileTask();
46       ExecutionImpl executionImpl0 = new ExecutionImpl();
47       try { 
48         readFileTask0.execute(executionImpl0);
49         fail("Expecting exception: RuntimeException");
50       
51       } catch(RuntimeException e) {
52          //
53          // ReadFileTask injected field 'inputVariable' is bad: missing required field
54          //
55          verifyException("org.openecomp.mso.bpmn.core.BaseTask", e);
56       }
57   }
58 }