I\'m trying to use mock to verify that an index property has been set. Here\'s a moq-able object with an index:
public class Index { IDictionary
This should work
[Test] public void MoqUsingSetup() { //arrange var index = new Mock(); index.SetupSet(o => o["Key"] = "Value").Verifiable(); // act index.Object["Key"] = "Value"; //assert index.Verify(); }
You can just treat it like a normal property setter.