Moq – Mocking a cast on an interface

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 Comment

Filed under Comps

Leave a Reply