public void IsNotInstanceOfType_Fail() { MockAssertResultHandler mockAssert = new MockAssertResultHandler(); ServiceLocator.AssertResultHandler = mockAssert; ApplicationPathFinder finder = new ApplicationPathFinder("foo"); MWTAssert.IsNotInstanceOfType(finder, typeof(ApplicationPathFinder), "This is a message '{0}'.", "foo"); UnitTestAssert.AreEqual("This is a message 'foo'.", mockAssert.LastMessage); }
public void IsNotInstanceOfType_Pass() { MockAssertResultHandler mockAssert = new MockAssertResultHandler(); ServiceLocator.AssertResultHandler = mockAssert; ApplicationPathFinder finder = new ApplicationPathFinder("foo"); MWTAssert.IsNotInstanceOfType(finder, typeof(int), "Error Message"); UnitTestAssert.AreEqual("Assert.IsNotInstanceOfType: Unexpected Type <System.Int32>, Actual Type <LTAF.ApplicationPathFinder>, Value <LTAF.ApplicationPathFinder>!", mockAssert.LastMessage); }