fix local build and ci build failures

This commit is contained in:
Krzysztof Wicher 2016-12-28 14:50:34 -08:00
parent e9dc08eafa
commit efe1b7b143
10 changed files with 51 additions and 36 deletions

View file

@ -24,5 +24,15 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
return new AndConstraint<StringAssertions>(assertions);
}
public static AndConstraint<StringAssertions> ContainVisuallySameFragment(this StringAssertions assertions, string expected, string because = "", params object[] becauseArgs)
{
Execute.Assertion
.ForCondition(NormalizeLineEndings(assertions.Subject).Contains(NormalizeLineEndings(expected)))
.BecauseOf(because, becauseArgs)
.FailWith($"String \"{assertions.Subject}\" does not contain visually same fragment string \"{expected}\".");
return new AndConstraint<StringAssertions>(assertions);
}
}
}