This commit is contained in:
Oliver Booth 2023-08-27 13:45:07 +01:00
parent dfa0bd4e11
commit 5220f386aa
Signed by: oliverbooth
GPG Key ID: B89D139977693FED
1 changed files with 2 additions and 0 deletions

View File

@ -215,7 +215,9 @@ internal class StringTests
{ {
string value = null!; string value = null!;
Assert.Throws<ArgumentNullException>(() => value.CountSubstring('\0')); Assert.Throws<ArgumentNullException>(() => value.CountSubstring('\0'));
#pragma warning disable CA1307
Assert.Throws<ArgumentNullException>(() => value.CountSubstring(string.Empty)); Assert.Throws<ArgumentNullException>(() => value.CountSubstring(string.Empty));
#pragma warning restore CA1307
Assert.Throws<ArgumentNullException>(() => value.CountSubstring(string.Empty, StringComparison.OrdinalIgnoreCase)); Assert.Throws<ArgumentNullException>(() => value.CountSubstring(string.Empty, StringComparison.OrdinalIgnoreCase));
} }