diff --git a/.editorconfig b/.editorconfig
index 5ec487663..20a4e2dae 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -241,3 +241,4 @@ dotnet_diagnostic.MA0005.severity = none
dotnet_diagnostic.MA0016.severity = none
dotnet_diagnostic.MA0048.severity = none
dotnet_diagnostic.MA0051.severity = none
+dotnet_diagnostic.MA0099.severity = none
diff --git a/Directory.Packages.props b/Directory.Packages.props
index c928198cd..37ccdd32b 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -39,6 +39,6 @@
-
+
diff --git a/Source/Testably.Abstractions.Testing/Polyfills/StringExtensionMethods.cs b/Source/Testably.Abstractions.Testing/Polyfills/StringExtensionMethods.cs
index b75c2bf53..af68506d0 100644
--- a/Source/Testably.Abstractions.Testing/Polyfills/StringExtensionMethods.cs
+++ b/Source/Testably.Abstractions.Testing/Polyfills/StringExtensionMethods.cs
@@ -53,7 +53,9 @@ internal static string Replace(
string newValue,
StringComparison comparisonType)
{
+ #pragma warning disable MA0074
return @this.Replace(oldValue, newValue);
+ #pragma warning restore MA0074
}
///
diff --git a/Tests/Testably.Abstractions.Testing.Tests/FileSystemInitializer/DirectoryDescriptionTests.cs b/Tests/Testably.Abstractions.Testing.Tests/FileSystemInitializer/DirectoryDescriptionTests.cs
index 652fec2f6..d0e699e34 100644
--- a/Tests/Testably.Abstractions.Testing.Tests/FileSystemInitializer/DirectoryDescriptionTests.cs
+++ b/Tests/Testably.Abstractions.Testing.Tests/FileSystemInitializer/DirectoryDescriptionTests.cs
@@ -15,7 +15,7 @@ public void Children_ShouldBeSortedAlphabetically(string[] childNames)
.Cast()
.ToArray());
- sut.Children.Select(c => c.Name).Should().BeInAscendingOrder();
+ sut.Children.Select(c => c.Name).Should().BeInAscendingOrder(StringComparer.Ordinal);
}
[Fact]
diff --git a/Tests/Testably.Abstractions.Testing.Tests/Helpers/RandomSystemExtensionsTests.cs b/Tests/Testably.Abstractions.Testing.Tests/Helpers/RandomSystemExtensionsTests.cs
index 491b9fca8..a24e9df7b 100644
--- a/Tests/Testably.Abstractions.Testing.Tests/Helpers/RandomSystemExtensionsTests.cs
+++ b/Tests/Testably.Abstractions.Testing.Tests/Helpers/RandomSystemExtensionsTests.cs
@@ -18,7 +18,7 @@ public void GenerateRandomFileExtension_ShouldNotStartWithDotOrReturnEmptyString
while (true)
{
string fileExtension = randomSystem.Random.Shared.GenerateFileExtension();
- if (fileExtensions.Contains(fileExtension))
+ if (fileExtensions.Contains(fileExtension, StringComparer.Ordinal))
{
break;
}
@@ -46,7 +46,7 @@ public void GenerateRandomFileName_ShouldGenerateEdgeCases()
while (true)
{
string fileName = randomSystem.Random.Shared.GenerateFileName();
- if (fileNames.Contains(fileName))
+ if (fileNames.Contains(fileName, StringComparer.Ordinal))
{
break;
}
diff --git a/Tests/Testably.Abstractions.Tests/TestHelpers/Polyfills/StringExtensions.cs b/Tests/Testably.Abstractions.Tests/TestHelpers/Polyfills/StringExtensions.cs
index 377ea5153..7f78835b9 100644
--- a/Tests/Testably.Abstractions.Tests/TestHelpers/Polyfills/StringExtensions.cs
+++ b/Tests/Testably.Abstractions.Tests/TestHelpers/Polyfills/StringExtensions.cs
@@ -27,7 +27,9 @@ internal static string Replace(
string newValue,
StringComparison comparisonType)
{
+ #pragma warning disable MA0074 // Avoid implicit culture-sensitive methods
return @this.Replace(oldValue, newValue);
+ #pragma warning restore MA0074 // Avoid implicit culture-sensitive methods
}
}
#endif