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

TrackerContext cannot be mocked with Moq framework #71

Closed
johnmannix opened this issue Nov 6, 2015 · 5 comments
Closed

TrackerContext cannot be mocked with Moq framework #71

johnmannix opened this issue Nov 6, 2015 · 5 comments

Comments

@johnmannix
Copy link

When trying to mock a type derived from TrackerContext with the Moq framework there is an issue which prevents the mock from being instantiated. The issue is described in this bug report for Moq:

castleproject/Core#106

Whilst it appears this is an issue with Moq, it can be worked around by ensuring that type names of generic types match between the interface and the class.

@johnmannix
Copy link
Author

Pull request for work around #72

@bilal-fazlani
Copy link
Owner

@johnmannix I can't pull your code because you renamed TEntity with TTable. But The correct TypeParam is TEntity. So I renamed everything else to TEntity. Since they are all consistent now, the mocking should work.

Let me know. Thanks.

@johnmannix
Copy link
Author

@bilal-fazlani Thanks. Would you be able to update the nuget package with this fix?

@bilal-fazlani
Copy link
Owner

@johnmannix
Copy link
Author

Thanks @bilal-fazlani that solves my problem

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

2 participants