Why use It.is<> or It.IsAny<> if I could just define a variable?
<p>Hi I've been using moq for a while when I see this code.</p>

<p>I have to setup a return in one of my repo.</p>

<pre><code> mockIRole.Setup(r =&gt; r.GetSomething(It.IsAny&lt;Guid&gt;(), It.IsAny&lt;Guid&gt;(), 
                  It.IsAny&lt;Guid&gt;())).Returns(ReturnSomething);
</code></pre>

<p>I have three parameters and I just saw these in one of articles or blog on the net.</p>

<p>What is the use of <code>It.Is&lt;&gt;</code> or <code>It.IsAny&lt;&gt;</code> for an object? if I could use <code>Guid.NewGuid()</code> or other types then why use <code>It.Is</code>?</p>

<p>I'm sorry I'm not sure if my question is right or am I missing some knowledge in testing.
But it seems like there is nothing wrong either way.</p>