Invalid setup on a non virtual member using MOQ
<p>I'm moqing an interface which has:</p>

<p><code>Dictionary&lt;string, object&gt; InstanceVariables { get; set; }</code></p>

<p>I've created a new mock of the interface and trying to set it up so it returns just a random string like so:</p>

<p><code>_mockContext.SetupGet(m =&gt; m.InstanceVariables[It.IsAny&lt;string&gt;()]).Returns(@"c:\users\randomplace");</code></p>

<p>But I seem to get an error:</p>

<p><code>{"Invalid setup on a non-virtual (overridable in VB) member: m =&gt; m.InstanceVariables[It.IsAny&lt;String&gt;()]"}</code></p>

<p>What does this mean exactly? I am mocking the interface so shouldn't this not be a problem?</p>

<p>Thanks</p>