You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: