Skip to content

Commit

Permalink
Enforce FA alternative.
Browse files Browse the repository at this point in the history
  • Loading branch information
Corniel committed Mar 28, 2024
1 parent a3ae76b commit fa68a63
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Expand Up @@ -46,10 +46,14 @@ dotnet_diagnostic.CA2254.severity = warning # Template should be a static expres
dotnet_diagnostic.CS8763.severity = warning # A method marked [DoesNotReturn] should not return.
dotnet_diagnostic.CS8770.severity = warning # Method lacks [DoesNotReturn] annotation to match implemented or overridden member.

dotnet_diagnostic.FAA0004.severity = error # Replace NUnit assertion with Fluent Assertions equivalent

dotnet_diagnostic.NUnit1001.severity = none # The individual arguments provided by a TestCaseAttribute must match the type of the corresponding parameter of the method
dotnet_diagnostic.NUnit2005.severity = suggestion # Consider using Assert.That(actual, Is.EqualTo(expected)) instead of Assert.AreEqual(expected, actual)
dotnet_diagnostic.NUnit2021.severity = warning # Incompatible types for EqualTo constraint



dotnet_diagnostic.QW0001.severity = none # Use a testable Time Provider
dotnet_diagnostic.QW0010.severity = none # Use DateOnly instead of Date
dotnet_diagnostic.QW0003.severity = warning # Decorate Pure functions
Expand Down
3 changes: 3 additions & 0 deletions specs/Qowaiv.Specs/Reflection/QowaivType_specs.cs
Expand Up @@ -19,6 +19,7 @@ public void Is_false_for_object()

[Test]
public void Is_false_for_non_default_primitive()

=> Assert.That(QowaivType.IsNullOrDefaultValue(17), Is.False);
}

Expand All @@ -39,7 +40,9 @@ public class NotNullableType
[TestCase(typeof(string))]
[TestCase(typeof(int))]
public void Returns_type_for_non_nullable(Type type)
#pragma warning disable FAA0004 // Replace NUnit assertion with Fluent Assertions equivalent
=> Assert.That(QowaivType.GetNotNullableType(type), Is.EqualTo(type));
#pragma warning restore FAA0004 // Replace NUnit assertion with Fluent Assertions equivalent

[Test]
public void Returns_underlying_type_for_nullable()
Expand Down
3 changes: 3 additions & 0 deletions specs/Qowaiv.Specs/_Legacy/.editorconfig
@@ -0,0 +1,3 @@
# Static coce analysis
[*]
dotnet_diagnostic.FAA0004.severity = suggestion # Replace NUnit assertion with Fluent Assertions equivalent

0 comments on commit fa68a63

Please sign in to comment.