Hello,
No, its a custom collection not in MSCoreLib, its my own collection. The mock I'm doing is:
var collectionFake = Isolate.Fake.Instance<PropertyCollection>();
Isolate.SwapNextInstance<PropertyCollection>();
Isolate.WhenCalled(() => collectionFake.Add(new Property("test", this))).IgnoreCall();
var propertyFake = Isolate.Fake.Instance<Property>();
var m = new ModTest();
Isolate.WhenCalled(() => m.AddProperty(null)).IgnoreCall();
m.AddProperty(propertyFake);
Isolate.Verify.WasCalledWithExactArguments(() => collectionFake.Add(propertyFake));
PropertyCollection inherits from a custom colleciton class; that custom collection uses the generic list internally, but it does not inherit directly, but simply defines its own methods. That shouldn't be the issue; besides, I think MSCorLib entities throws exceptions.
But this doesn't work, and as far as I can tell, this is similar to the setup I asked about. Any help as to why verify doesn't verify the add call?
Thanks.