Make dotnet-help.Tests pass on localized setup
This commit is contained in:
parent
6e0cfa7839
commit
419562ba95
5 changed files with 29 additions and 5 deletions
|
@ -25,6 +25,16 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
return new AndConstraint<StringAssertions>(assertions);
|
||||
}
|
||||
|
||||
public static AndConstraint<StringAssertions> BeVisuallyEquivalentToIfNotLocalized(this StringAssertions assertions, string expected, string because = "", params object[] becauseArgs)
|
||||
{
|
||||
if (!DotnetUnderTest.IsLocalized())
|
||||
{
|
||||
return BeVisuallyEquivalentTo(assertions, expected, because, becauseArgs);
|
||||
}
|
||||
|
||||
return new AndConstraint<StringAssertions>(assertions);
|
||||
}
|
||||
|
||||
public static AndConstraint<StringAssertions> ContainVisuallySameFragment(this StringAssertions assertions, string expected, string because = "", params object[] becauseArgs)
|
||||
{
|
||||
Execute.Assertion
|
||||
|
@ -34,5 +44,15 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
|
||||
return new AndConstraint<StringAssertions>(assertions);
|
||||
}
|
||||
|
||||
public static AndConstraint<StringAssertions> ContainVisuallySameFragmentIfNotLocalized(this StringAssertions assertions, string expected, string because = "", params object[] becauseArgs)
|
||||
{
|
||||
if (!DotnetUnderTest.IsLocalized())
|
||||
{
|
||||
return ContainVisuallySameFragment(assertions, expected, because, becauseArgs);
|
||||
}
|
||||
|
||||
return new AndConstraint<StringAssertions>(assertions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue