IntelliTect / TestTools

A collection of tools for aiding in test automation
MIT License
10 stars 7 forks source link

Expected value with `++` displays incorrect message when failing. #59

Closed MarkMichaelis closed 4 years ago

MarkMichaelis commented 5 years ago

When you have an expected or actual value with ++ it gets stripped out of the error message.

            IntelliTect.TestTools.Console.ConsoleAssert.Expect(
                "Expected: C++", ()=>System.Console.WriteLine(
                "Actual: C++"
            ));

The resulting message is has removed the ++ from expected and actual strings:

  Message: 
    Test method AddisonWesley.Michaelis.EssentialCSharp.Chapter03.Listing03_26B.Tests.ProgramTests.Main_GetLengthOfDimensionOf3DArray_ReturnsLength threw exception: 
    System.Exception: Values are not equal:- 
    -----------------------------------
    Expected: "Expected: C"
    Actual  : "Actual: C"
    -----------------------------------