I have the following production code:
public class Attach
{
public Attach()
{
throw new NotImplementedException();
}
}
public class WrapList
{
public List<string> myStrings
{ get; private set;}
public void Add(Attach attach)
{
}
}
and this test code will fail:
[Test, Isolated]
public void WrapListMore()
{
WrapList wrapList = Isolate.Fake.Instance<WrapList>(Members.ReturnRecursiveFakes);
wrapList.Add(new Attach());
}
because the new Attach() statement is not mocked. But I think since the new Attach() is inside the wrapList.Add, which is a fake object, the new Attach() should be mocked as well so that no exception is thrown.
________
HALF-BAKED