Mocking a Cast on a Mocked Interface

The Setup

var mockedInterface = new Mock<IInterface>();
mockedInterface.As().Setup(i => i.MethodOnTheInterface());

Easy as that!


Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: