-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
UserTimeZoneService needs an interface #16613
Comments
What exactly do you need to mock in your tests? |
and yet we extend orchard core way past what is in the orchard core repository :) which means we use Is that a good thing or not? I don't know, but its easier to use the orchard core services that are available, than copying hte code into our repository |
Does Moq support mocking this class? Methods are not overridable so probably no possible? Adding an interface to a public service would mean that we'll add interface to any public service when someone asks for it. We should have made this type internal if we thought it would not be used externally (and mocked). If mocking works, even if that's not easy, I would not add an interface. Another point of view is that we may actually want it to be public if someone wants to create a feature enhances/uses this feature. In that case we could add the interface. |
We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues). This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here. |
I will try to write a unit test mocking this service |
annoying to mock
UserTimeZoneService
The text was updated successfully, but these errors were encountered: