New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xunit: define codefixes for StringAsserts #145
Comments
@jnyrup / @dennisdoomen any idea about an equivalent for using From what I was able to tell there are the following: for
for
for
for
for
so for constant values of using explicitly What about
should each of these suggest to use |
There's no idiomatic way to pass a There are ugly ways "someString".Should().Match(e => string.Equals(e, "SoMeStRiNg", StringComparison.OrdinalIgnoreCase));
"someString".As<object>().Should().Be("SoMeStRiNg", StringComparer.OrdinalIgnoreCase); Note that in v6 the For v7 we're currently having discussing on how to improve on this |
The asserts defined in https://github.com/xunit/assert.xunit/blob/main/StringAsserts.cs
Contains(string expectedSubstring, string actualString)
add support for xunit StringAsserts Contains #221DoesNotContain(string expectedSubstring, string actualString)
add support for xunit StringAsserts DoesNotContain #223DoesNotMatch(string expectedRegexPattern, string actualString)
add support for xunit StringAsserts DoesNotMatches #225DoesNotMatch(Regex expectedRegex, string actualString)
add support for xunit StringAsserts DoesNotMatches #225Matches(string expectedRegexPattern, string actualString)
add support for xunit StringAsserts Matches #224Matches(Regex expectedRegex, string actualString)
add support for xunit StringAsserts Matches #224Empty(string value)
add support for xunit StringAsserts Empty #226EndsWith(string expectedEndString, string actualString)
add support for xunit StringAsserts EndsWith #227StartsWith(string expectedStartString, string actualString)
add support for xunit StringAsserts StartsWith #228Equal(string expected, string actual)
add support for xunit StringAsserts Equals #229The text was updated successfully, but these errors were encountered: