Hej Buddies!
I'm trying to create a mock for an interface like the one below:
public interface ITheInterface: IEnumerable
{
...
}
In these manners:
var theInterfaceMock = new Mock<ITheInterface>();
theInterfaceMock.Setup(x => x.OfType<SomeType>()).Returns(something);
and
var theInterfaceMock = new Mock<ITheInterface>();
theInterfaceMock.As<IEnumerable>();
theInterfaceMock.Setup(x => x.OfType<SomeType>()).Returns(something);
And in both cases I'm getting a System.NotSupportedException that basically tells me that that ITheInterface doesn't have the OfType() method (when it actually does have it). Anybody knows any way to solve this issue?.
Thank you!