Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/FluentAssertions.Analyzers.Tests/Tips/NunitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ public class NunitTests
[AssertionDiagnostic("Assert.False(bool.Parse(\"false\"){0});")]
[AssertionDiagnostic("Assert.IsFalse(actual{0});")]
[AssertionDiagnostic("Assert.IsFalse(bool.Parse(\"false\"){0});")]
[AssertionDiagnostic("Assert.That(actual, Is.False{0});")]
[AssertionDiagnostic("Assert.That(actual, Is.Not.True{0});")]
[Implemented]
public void Nunit3_AssertFalse_TestAnalyzer(string assertion) => Nunit3VerifyDiagnostic("bool actual", assertion);

Expand All @@ -123,6 +125,12 @@ public class NunitTests
[AssertionCodeFix(
oldAssertion: "Assert.IsFalse(bool.Parse(\"false\"){0});",
newAssertion: "bool.Parse(\"false\").Should().BeFalse({0});")]
[AssertionCodeFix(
oldAssertion: "Assert.That(actual, Is.False{0});",
newAssertion: "actual.Should().BeFalse({0});")]
[AssertionCodeFix(
oldAssertion: "Assert.That(actual, Is.Not.True{0});",
newAssertion: "actual.Should().BeFalse({0});")]
[Implemented]
public void Nunit3_AssertFalse_TestCodeFix(string oldAssertion, string newAssertion) => Nunit3VerifyFix("bool actual", oldAssertion, newAssertion);

Expand Down