Home » Bugs | ASP.NET | Code | Testing

Test Problem

7. January 2009 by thebeebs 0 Comments

Assert.Fail failed. Assert.Equals should not be used for Assertions. Please use Assert.AreEqual & overloads instead.

I just got above error message… I used Assert.Equals(product.ProductId, productId); but actually the equals is not an assertion it’s just part of the object. I should have used Assert.AreEqual(product.ProductId, productId);

If you get this error just switch Equals for are Equal.

Comments

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading