I've been struggling to use Moq as a mocking framework and copied some very simple example code. I must be missing something really stupid here. It throws a NotSupportedException on the Setup call, even though it points to the Returns method. This code is part of my tests class:
class Test
{
public string DoSomethingStringy(string s)
{
return s;
}
}
[TestInitialize]
public void Setup()
{
var mock = new Mock<Test>();
mock.Setup(x => x.DoSomethingStringy(It.IsAny<string>()))
.Returns((string s) => s.ToLower());
}