Hi,
I would like to write JUnit-Tests for my process model with camunda-bpm-assert. Therefore, I would like to check some values of my variables after the process instance is already finished.
Trying to do that my assert-statement looks like that:
assertThat(processInstance) //
.hasPassed(“StartEvent1”) //
.hasNotPassed(“EndEvent1”) //
.hasVariables(“s”) //
.isEnded(); //
Unfortunatelly, the following exception occurs:
java.lang.AssertionError: Expecting assertion to be called on non-null current state of actual org.camunda.bpm.engine.impl.persistence.entity.ProcessInstanceWithVariablesImpl@68d651f2, but found it to be null!
at org.camunda.bpm.engine.test.assertions.AbstractProcessAssert.getExistingCurrent(AbstractProcessAssert.java:49)
at org.camunda.bpm.engine.test.assertions.ProcessInstanceAssert.hasVars(ProcessInstanceAssert.java:274)
at org.camunda.bpm.engine.test.assertions.ProcessInstanceAssert.hasVariables(ProcessInstanceAssert.java:257)
I was wondering if you please could tell me the right way for executing my variable-check? If you need further information do not hesitate to contact me.
Thank you in advance