Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mocking Mediators and Handlers #42

Open
chadangerer opened this issue Nov 19, 2015 · 0 comments
Open

Mocking Mediators and Handlers #42

chadangerer opened this issue Nov 19, 2015 · 0 comments

Comments

@chadangerer
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant