-
Notifications
You must be signed in to change notification settings - Fork 291
Closed
Description
If you have a class that overloads operators == and !=, writing the proper unit tests results in MSTEST0037: Use proper 'Assert' methods:
public sealed class SomeClass
{
public static Boolean operator ==(SomeClass left, SomeClass right)
{
...
}
public static Boolean operator !=(SomeClass left, SomeClass right)
{
...
}
}
[TestMethod]
public void SomeClass_TestOperatorEquals()
{
var left = new SomeClass(...);
var right = new SomeClass(...);
Assert.IsTrue(laft == right); // MSTEST0037
}