kbilsted / StatePrinter

Automating unit testing and ToString() coding
Apache License 2.0
93 stars 32 forks source link

Bugfix: Problem with rewriting expected values if value contains brackets. #49

Closed addamichal closed 7 years ago

addamichal commented 7 years ago

Current version does not correctly rewrite expected value, if given value contains brackets. Example:

string expected = @"new List<Int32>()
{
    [0] = 1
    [1] = 2
    [2] = 3
    [3] = 4
}";
TestHelper.Assert().PrintEquals(expected, actual);

This code should fix given problem.

kbilsted commented 7 years ago

great stuff!