title: Moq not matching (simple) setup
body: <p>I'm new to Moq, and having what seems to be a silly problem.
  If I perform the setup based on a loop it iwll not match, but if I do the "identicatal" setup by hand I do get a match.</p>
  
  <p>I am using Moq 4.0.10827, from NuGet</p>
  
  <p>My interface being mocked is simple:</p>
  
  <pre><code>public interface IMyInterface
  {
      string GetValue(string input);
  }
  </code></pre>
  
  <p>The test-entire program is below.
  The expected output is identical for both methods, but "Foo" is not printed for Version2()</p>
  
  <p>Code:</p>
  
  <pre><code>class Program
  {
      static void Main(string[] args)
      {
          Version1();
          Console.WriteLine("---------");
          Version2();
          Console.WriteLine("---------");
          Console.ReadKey();
      }
  
      private static void Version1()
      {
          var mock = new Mock&lt;IMyInterface&gt;();
  
          mock.Setup(x =&gt; x.GetValue(It.Is&lt;string&gt;(s =&gt; s == "Foo"))).Returns("Foo");
          mock.Setup(x =&gt; x.GetValue(It.Is&lt;string&gt;(s =&gt; s == "Bar"))).Returns("Bar");
  
          IMyInterface obj = mock.Object;
  
          Console.WriteLine(obj.GetValue("Foo"));
          Console.WriteLine(obj.GetValue("Bar"));
      }
  
      private static void Version2()
      {
          var mock = new Mock&lt;IMyInterface&gt;();
  
          string[] keys = new string[] { "Foo", "Bar" };
  
          foreach (string key in keys)
          {
              mock.Setup(x =&gt; x.GetValue(It.Is&lt;string&gt;(s =&gt; s == key))).Returns(key);
          }
  
          IMyInterface obj = mock.Object;
  
          Console.WriteLine(obj.GetValue("Foo")); // Does not match anything
          Console.WriteLine(obj.GetValue("Bar"));            
      }
  }
  </code></pre>
  
  <p>I take it I am missing something.. but what ?</p>
  
  <p><strong>Program output:</strong></p>
  
  <pre><code>Foo
  Bar
  ---------
  
  Bar
  ---------
  </code></pre>
  
  <p>Edit: Output from program</p>