validate MOQ unit test method return value
<p>I have the below class and test class written using Moq:</p>

<pre><code>public class Mytest : testin
{
    public int getId(int id)
    {
      int s = 2;
      return s;
    }

}
</code></pre>

<p>test class:</p>

<pre><code>private Mock&lt;testin&gt; _mock;

[TestInitialize]
public void Setup()
{
    _mock = new Mock&lt;testin&gt;();

}

[TestMethod]
public void returngetId()
{

    // Build up our mock object

    _mock.Setup(x =&gt; x.getId(It.IsAny&lt;int&gt;())).Returns(1)

}
</code></pre>

<p>I'm returning <strong>2</strong> from the function and in unit test cases checking for the value <strong>1</strong>. As per my understanding the test cases should fail. But im getting success message. How i can validate the return value is exactly what im expecting? I want to fail the test if it returning other than 1.</p>