Try creating a variable, assign it to null, and use it in the mock.
Sent from my Windows Phone
is it possible to mock null as return value using Linq to Mocks?
something like this:
public class IMyClass
string MyMethod(int a);
// following line doesn't work:
var mock = Mock.Of<IMyClass>(c=> c.MyMethod(5) == null);
// neither this one
var mock = Mock.Of<IMyClass>(c=> c.MyMethod(5) == (string)null);
// only without Linq to Mocks
var mock = new Mock<IMyClass>();
You received this message because you are subscribed to the Google Groups "Moq Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moqdisc+u...@googlegroups.com
For more options, visit https://groups.google.com/groups/opt_out