optimajet/WorkflowEngine.NET

UnitTesting

Armarr opened this issue · 1 comments

Is there a recommended way to write unit tests for methods that utilize WFE?
Ideally I would want to mock WorkflowRuntime, but it does not implement an interface I can mock.
I can mock the interfaces IPersistenceProvider, ISchemePersistenceProvider and IWorkflowGenerator. But that is a lot of work because I have to provide fully functional implementations or the Runtime will throw errors.

Any chance for an IWorkflowRuntime interface or an In-memory persistence provider?

My recommendation is using a separate database for unit tests.
We don't have any plans for having an in-memory persistence provider. It's the first request about it.