title: Mocking foreach loop with Moq
body: <p>I want to loop throug a XmlNodeList. How do you mock a XmlNodeList in Moq, so you can loop through it like in a foreach loop:</p>
  
  <pre><code>        foreach (XmlNode xmlNode in nodes)
          {
              //Do something with node
          }
  </code></pre>
  
  <p>I have tried to set up via a the <code>SetupSequence</code> method, but I haven't been able to create the desired mock. </p>