I have an interface
interface IService
{
IService Configure();
bool Run();
}
The "real" implementation does this:
class RealService : IService
{
public IService Configure()
{
return this;
}
public bool Run()
{
return true;
}
}
Using Moq to mock the service creates a default implementation of Configure() that returns null.
Is there a way to setup methods in Moq that return the mocked instance?