Пример #1
0
        public void StringDoesNotContains_Fail()
        {
            MockAssertResultHandler mockAssert = new MockAssertResultHandler();

            ServiceLocator.AssertResultHandler = mockAssert;
            MWTAssert.StringDoesNotContain("foobar", "bar", "This is a message '{0}'.", "foo");
            UnitTestAssert.AreEqual("This is a message 'foo'.", mockAssert.LastMessage);
        }
Пример #2
0
        public void StringDoesNotContains_Pass()
        {
            MockAssertResultHandler mockAssert = new MockAssertResultHandler();

            ServiceLocator.AssertResultHandler = mockAssert;
            MWTAssert.StringDoesNotContain("foobar", "baz", "This is a message '{0}'.", "foo");
            UnitTestAssert.AreEqual("Assert.StringContains: Value <foobar>, Does Not Contain Substring <baz>!", mockAssert.LastMessage);
        }