title: NUnit: Dictionary Assert
body: <p>I want a <strong>one liner</strong>, in NUnit, that asserts whether two dictionary are the same. i.e., I want a concise version of the below code:</p>
  
  <pre><code>public static void DictionaryAssert&lt;T, U&gt;(Dictionary&lt;T, U&gt; dictionaryResult, Dictionary&lt;T, U&gt; expectedResult)
  {
      Assert.AreEqual(dictionaryResult.Count, expectedResult.Count);
      foreach (var aKey in expectedResult.Keys)
      {
          Assert.AreEqual(expectedResult[aKey], dictionaryResult[aKey]);
      }
  }
  </code></pre>
  
  <p>Surely it isn't so difficult, but I can't find the reference, any idea?</p>