NUnit's Assert.Equals throws exception "Assert.Equals should not be used for assertions"

Viewed 25367

I recently attempted to use the method Assert.Equals() when writing a new NUnit test. Upon execution this method throws an AssertionException stating that Assert.Equals should not be used for Assertions. This is a bit baffling at first glance. What's going on here?

2 Answers

tldr;

Assert.AreEqual(a, b); // <-- Compares a, b

not:

Assert.Equals(a, b); // <-- Irrelevant equality operator on Assert itself
Related