[Test]
public void ConvertingComplexListOfPropertiesToJsonWorksCorrectly()
{
var items = new Dictionary<string, object>();
items.Add("First", 1);
items.Add("Second", 2);
var childItems = new Dictionary<string, object>();
items.Add("Tenth", 10);
items.Add("Eleventh", 11);
var childFake = Isolate.Fake.Instance<ClientProperties>();
Isolate.NonPublic.Property.WhenGetCalled(childFake, "Items").WillReturn(childItems);
items.Add("Third", childFake);
items.Add("Fourth", 4);
var propertiesFake = Isolate.Fake.Instance<ClientProperties>();
Isolate.NonPublic.Property.WhenGetCalled(propertiesFake, "Items").WillReturn(items);
.
.
.
}
The issue is that the propertiesFake fake gets 6 items, while the other fake (childFake) gets zero items. Why is that? THat doesn't make any sense...
Thanks.