public void AreNotEqual_Float_Fail() { MockAssertResultHandler mockAssert = new MockAssertResultHandler(); ServiceLocator.AssertResultHandler = mockAssert; MWTAssert.AreNotEqual(1.0, 1.3, 0.8, "This is a message '{0}'.", "foo"); UnitTestAssert.AreEqual("This is a message 'foo'.", mockAssert.LastMessage); }
public void AreNotEqual_Float_Pass() { MockAssertResultHandler mockAssert = new MockAssertResultHandler(); ServiceLocator.AssertResultHandler = mockAssert; MWTAssert.AreNotEqual((float)1.0, (float)1.9, (float)0.2, "Error Message"); UnitTestAssert.AreEqual("Assert.AreNotEqual: Not Expected <1>, Actual <1.9>, Delta <0.2>!", mockAssert.LastMessage); }
public void AreNotEqual_String_PassCaseInsensitive() { MockAssertResultHandler mockAssert = new MockAssertResultHandler(); ServiceLocator.AssertResultHandler = mockAssert; MWTAssert.AreNotEqual("foo", "FOO", false, "Error Message"); UnitTestAssert.AreEqual("Assert.AreNotEqual: Not Expected <foo>, Actual <FOO>!", mockAssert.LastMessage); }
public void AreNotEqual_Int_Pass() { MockAssertResultHandler mockAssert = new MockAssertResultHandler(); ServiceLocator.AssertResultHandler = mockAssert; MWTAssert.AreNotEqual(1, 2, "Error Message"); UnitTestAssert.AreEqual("Assert.AreNotEqual<System.Int32>: Not Expected <1>, Actual <2>!", mockAssert.LastMessage); }
public void AreNotEqual_String_PassWithMessage() { MockAssertResultHandler mockAssert = new MockAssertResultHandler(); ServiceLocator.AssertResultHandler = mockAssert; MWTAssert.AreNotEqual("foo", "bar", "Error Message"); UnitTestAssert.AreEqual("Assert.AreNotEqual<System.String>: Not Expected <foo>, Actual <bar>!", mockAssert.LastMessage); }
public void AreNotEqual_String_Fail() { MockAssertResultHandler mockAssert = new MockAssertResultHandler(); ServiceLocator.AssertResultHandler = mockAssert; MWTAssert.AreNotEqual("foo", "FOO", false); MWTAssert.AreNotEqual("foo", "FOO", true, "This is a message '{0}'.", "foo"); UnitTestAssert.AreEqual("This is a message 'foo'.", mockAssert.LastMessage); }
public void AreNotEqual_Object_Pass() { MockAssertResultHandler mockAssert = new MockAssertResultHandler(); ServiceLocator.AssertResultHandler = mockAssert; object o1 = new List <string>(); object o2 = new List <int>(); MWTAssert.AreNotEqual(o1, o2, "Error Message"); UnitTestAssert.AreEqual("Assert.AreNotEqual<System.Object>: Not Expected <System.Collections.Generic.List`1[System.String]>, Actual <System.Collections.Generic.List`1[System.Int32]>!", mockAssert.LastMessage); }