Beispiel #1
0
        public void StringIsNullOrEmpty_Fail()
        {
            MockAssertResultHandler mockAssert = new MockAssertResultHandler();

            ServiceLocator.AssertResultHandler = mockAssert;
            MWTAssert.StringIsNullOrEmpty("foo", "This is a message '{0}'.", "foo");
            UnitTestAssert.AreEqual("This is a message 'foo'.", mockAssert.LastMessage);
        }
Beispiel #2
0
        public void StringIsNullOrEmpty_Pass()
        {
            MockAssertResultHandler mockAssert = new MockAssertResultHandler();

            ServiceLocator.AssertResultHandler = mockAssert;
            string s = null;

            MWTAssert.StringIsNullOrEmpty(s, "Error Message");
            UnitTestAssert.AreEqual("Assert.StringIsNullOrEmpty", mockAssert.LastMessage);
        }