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)); }
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)); }