Exemplo n.º 1
0
        public void StringStartsWith_Fail()
        {
            MockAssertResultHandler mockAssert = new MockAssertResultHandler();

            ServiceLocator.AssertResultHandler = mockAssert;
            MWTAssert.StringStartsWith("foobar", "bar", "This is a message '{0}'.", "foo");
            UnitTestAssert.AreEqual("This is a message 'foo'.", mockAssert.LastMessage);
        }
Exemplo n.º 2
0
        public void StringStartsWith_Pass()
        {
            MockAssertResultHandler mockAssert = new MockAssertResultHandler();

            ServiceLocator.AssertResultHandler = mockAssert;
            MWTAssert.StringStartsWith("foobar", "foo", "Error Message");
            UnitTestAssert.AreEqual("Assert.StringStartsWith: Value <foobar>, Starts with <foo>!", mockAssert.LastMessage);
        }