Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C# Unit Testing in C# Writing Unit Tests Running Tests

Radu - Adrian Buha
PLUS
Radu - Adrian Buha
Courses Plus Student 5,535 Points

Assert.Equals() is no longer actual. You have to use Assert.AreEqual()

Apparently, the Assert.Equals() is no longer actual. When I ran my test, the Test Explorer Window showed me the PointTest was failed and I got an error: "Assert.Equals should not be used for Assertions. Please use Assert.AreEqual & overloads instead."

After changing to Assert.AreEqual(), the test passed.

I should mention that I used the xUnit.Core framework.

1 Answer

Radu - Adrian Buha
PLUS
Radu - Adrian Buha
Courses Plus Student 5,535 Points

Nope! My mistake, I used the wrong test framework. Insead of using Xunit, I used the "MSTestv2 framework". Sorry.