In my unit tests, I want to assert that workflow.Sleep()
was called. How do I do this?
It's possible to access the emulated time using the TestWorkflowEnvironment.Now()
function. For example:
before := testenv.Now()
testenv.ExecuteWorkflow(...)
after := testenv.Now()
Then assert on the change between before
and after
.