holunda-io/camunda-bpm-data

The verify* methods should support checks for multiple verifications

Closed this issue · 0 comments

Currently, it is only possible to check whenever a variable has been read once. If the variable is read more than one, the test will fail with the following exception:

org.mockito.exceptions.verification.TooManyActualInvocations: 
runtimeService.getVariable(
    "6b4ae81a-280f-44cc-adc7-9cf099ce839e",
    "variableName"
);
Wanted 1 time:
-> at io.holunda.camunda.bpm.data.mockito.RuntimeServiceMockVerifier.verifyGet(RuntimeServiceMockVerifier.kt:45)
But was 2 times:
-> at io.holunda.camunda.bpm.data.adapter.basic.ReadWriteAdapterRuntimeService.getOptional(ReadWriteAdapterRuntimeService.java:33)
-> at io.holunda.camunda.bpm.data.adapter.basic.ReadWriteAdapterRuntimeService.getOptional(ReadWriteAdapterRuntimeService.java:33)
	at io.holunda.camunda.bpm.data.mockito.RuntimeServiceMockVerifier.verifyGet(RuntimeServiceMockVerifier.kt:45)

fun <T> verifyGet(variableFactory: VariableFactory<T>, executionId: String) {