Is there a sensible way to stub/mock the results of a call to IDocumentSession.Query()
?
I have a command where I'd like to verify that methods are called on objects (that is the "unit" being tested is the command NOT the objects the command orchestrates). I can't save Mock objects (via RhinoMocks) into an embedded db instance, so at the moment and being forced to verify state on the objects being called, rather than just verifying that the correct methods have been called.
Thanks, Matt
You are better of when using EmbeddableDocumentStore { RunInMemory = true}
for unit testing.
That said, IDocumentSession
should be very easy to mock.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With