System.Web.TestUtil.UnitTestHelper.AssertEqualsIgnoreWhitespace C# (CSharp) Method

AssertEqualsIgnoreWhitespace() public static method

public static AssertEqualsIgnoreWhitespace ( string expected, string actual ) : void
expected string
actual string
return void
        public static void AssertEqualsIgnoreWhitespace(string expected, string actual)
        {
            expected = new String(expected.Where(c => !Char.IsWhiteSpace(c)).ToArray());
            actual = new String(actual.Where(c => !Char.IsWhiteSpace(c)).ToArray());

            Assert.Equal(expected, actual, StringComparer.OrdinalIgnoreCase);
        }
    }