public void IsNotNull_Pass() { MockAssertResultHandler mockAssert = new MockAssertResultHandler(); ServiceLocator.AssertResultHandler = mockAssert; ApplicationPathFinder finder = new ApplicationPathFinder("foo"); MWTAssert.IsNotNull(finder, "Error Message"); UnitTestAssert.AreEqual("Assert.IsNotNull", mockAssert.LastMessage); }
public void IsNotNull_Fail() { MockAssertResultHandler mockAssert = new MockAssertResultHandler(); ServiceLocator.AssertResultHandler = mockAssert; ApplicationPathFinder finder = new ApplicationPathFinder("foo"); object o = null; MWTAssert.IsNotNull(o, "This is a message '{0}'.", "foo"); UnitTestAssert.AreEqual("This is a message 'foo'.", mockAssert.LastMessage); }