Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.