Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

32 lines
1.2 KiB
C#

// Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.
using System.Globalization;
using System.Linq;
using Xunit;
namespace System.Web.TestUtil
{
public static class UnitTestHelper
{
public static bool EnglishBuildAndOS
{
get
{
bool englishBuild = String.Equals(CultureInfo.CurrentCulture.TwoLetterISOLanguageName, "en",
StringComparison.OrdinalIgnoreCase);
bool englishOS = String.Equals(CultureInfo.CurrentCulture.TwoLetterISOLanguageName, "en",
StringComparison.OrdinalIgnoreCase);
return englishBuild && englishOS;
}
}
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);
}
}
}