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

            ServiceLocator.AssertResultHandler = mockAssert;
            object o1 = new object();
            object o2 = new object();

            MWTAssert.AreSame(o1, o2, "This is a message '{0}'.", "foo");
            UnitTestAssert.AreEqual("This is a message 'foo'.", mockAssert.LastMessage);
        }
Beispiel #2
0
        public void AreSame_Pass()
        {
            MockAssertResultHandler mockAssert = new MockAssertResultHandler();

            ServiceLocator.AssertResultHandler = mockAssert;
            object o1 = new object();
            object o2 = new object();

            MWTAssert.AreSame(o1, o1, "Error Message");
            UnitTestAssert.AreEqual("Assert.AreSame: Expected <System.Object>", mockAssert.LastMessage);
        }