Hello,
i recently stumbled upon a seemingly weird behavior that Google completely failed to explain.
using Microsoft.VisualStudio.TestTools.UnitTesting;
class TestClass
{
public override bool Equals(object obj)
{
return true;
}
}
[TestMethod]
public void TestMethod1()
{
TestClass t = new TestClass ();
Assert.AreEqual (t, null); // fails
Assert.IsTrue (t.Equals (null)); // passes
}
I would expect this test to succeed. However, in Visual Studio 2008 / .NET 3.5 it fails. Is it intended to be like that or is it a bug?