title: Assert.Equal is not working with dates
body: <p>I have written a simple test method to verify a method that converts a long value to DateTime, following is the code...</p>
  
  <pre><code>        [TestMethod]
      public void ConvertToDateTime_TestMethod()
      {
          long date = 1500024370374;
  
          DateTime result = date.GetDateTime(); 
          DateTime comparisonDate = new DateTime(2017, 07, 14, 9, 26, 10);
          Assert.AreEqual(result, comparisonDate);
      }
  </code></pre>
  
  <p>Point is that both date and time values are exactly same (also verified in watch window) why does it gives this exception? I found <a href="https://automatetheplanet.com/assert-datetime-mstest-nunit/" rel="nofollow noreferrer">this</a> article that uses a delta to compare if minor time difference is failing the comparison but still unsure why I still need an extra function to compare date/time assertions.</p>
  
  <p>Edit-1: Here is my date conversion method which I am testing</p>
  
  <pre><code>    public static DateTime GetDateTime(this long milliseconds)
      {
          try
          {
              return new DateTime(1970, 1, 1).AddMilliseconds(Convert.ToDouble(milliseconds));
          }
          catch { throw; }
      }
  </code></pre>
  
  <p>Even though there is an alternate to this with new datetime(long), but logically whats wrong with this?</p>