Closed MovGP0 closed 4 years ago
Hey @MovGP0 :wave:,
Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our Open Collective and consider backing us.
https://opencollective.com/reactiveui
PS.: We offer
priority
support for all backers. Don't forget to addpriority
label when you start backing us :smile:
An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms!
Happy to take a PR for this one if you like.
Btw why would you ever need to mock a ValidationContext
? In unit tests, you could pass an instance of an ImmediateScheduler
to the constructor of the ValidationContext
, and this would result in immediate scheduling required by unit tests. We are following this pattern in ReactiveUI.Validation.Tests
now. https://github.com/reactiveui/ReactiveUI.Validation/blob/37505fc7bd74f48f252485f67aedb24ac5e2d00b/src/ReactiveUI.Validation.Tests/ValidationContextTests.cs#L41 Or, you could pass a TestScheduler
from the ReactiveUI.Testing
package. Setting up the desired validation context behavior should be quite easy via the fixture.ValidationRule(x => x.PropertyName)
syntax.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Describe the issue It is currently not easily possible to overwrite the
ValidationContext
class for unit testing. It would be better to make itsealed
and implement a base interface to allow for inversion of control (IOC) in unit tests.Instead of
use