I am looking for a best practice on mocking a handler that returns a result.
For instance I have a service that I would like to get under test. This service has an IMediator injected via constructor injection. Throughout the service I make use of Mediator.Request(SomeDataQuery).Data to get data for processing. I have multiple Mediator requests using different requests.
I am looking for a recommended way to mock the mediator and then setup the results from the various Handle methods.
If it helps I am using Ninject as my IoC container in my main application.
I am looking for a best practice on mocking a handler that returns a result.
For instance I have a service that I would like to get under test. This service has an IMediator injected via constructor injection. Throughout the service I make use of Mediator.Request(SomeDataQuery).Data to get data for processing. I have multiple Mediator requests using different requests.
I am looking for a recommended way to mock the mediator and then setup the results from the various Handle methods.
If it helps I am using Ninject as my IoC container in my main application.
Thanks.