Related blog post can be found here
Mocking entities using Moq library.
A use case on how to mock a dependency that needs to be casted into a derived interface.
Use of the .As<T>()
method is demonstrated.
_parentMock.As<IChildInterface>().Setup(m => m.ChildWork()).Verifiable();
Apache Version 2.0 License