public void AreNotSame_Fail() { MockAssertResultHandler mockAssert = new MockAssertResultHandler(); ServiceLocator.AssertResultHandler = mockAssert; object o1 = new object(); object o2 = new object(); MWTAssert.AreNotSame(o1, o1, "This is a message '{0}'.", "foo"); UnitTestAssert.AreEqual("This is a message 'foo'.", mockAssert.LastMessage); }
public void AreNotSame_PassWithMessage() { object o1 = new object(); object o2 = new object(); MockAssertResultHandler mockAssert = new MockAssertResultHandler(); ServiceLocator.AssertResultHandler = mockAssert; MWTAssert.AreNotSame(o1, o2, "Error Message"); UnitTestAssert.AreEqual("Assert.AreNotSame: Not Expected <System.Object>!", mockAssert.LastMessage); }