Exemple #1
0
        public void IsInstanceOfType_Fail()
        {
            MockAssertResultHandler mockAssert = new MockAssertResultHandler();

            ServiceLocator.AssertResultHandler = mockAssert;
            ApplicationPathFinder finder = new ApplicationPathFinder("foo");

            MWTAssert.IsInstanceOfType(finder, typeof(int), "This is a message '{0}'.", "foo");
            UnitTestAssert.AreEqual("This is a message 'foo'.", mockAssert.LastMessage);
        }
Exemple #2
0
        public void IsInstanceOfType_Pass()
        {
            MockAssertResultHandler mockAssert = new MockAssertResultHandler();

            ServiceLocator.AssertResultHandler = mockAssert;
            ApplicationPathFinder finder = new ApplicationPathFinder("foo");

            MWTAssert.IsInstanceOfType(finder, typeof(ApplicationPathFinder), "Error Message");
            UnitTestAssert.AreEqual("Assert.IsInstanceOfType: Expected Type <LTAF.ApplicationPathFinder>, Value <LTAF.ApplicationPathFinder>!", mockAssert.LastMessage);
        }