fluentassertions / fluentassertions/fluentassertions.analyzers

Don't suggest FAA0002 for xunit 3's Assert.Skip... usage

Open
#404 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
131
Forks
25
PR merge metrics
No merged PRs in 30d

Description

Currently when using conditional tests with xUnit 3's Assert.Skip... I get the notification that I should use the Fluent Assertions alternative, however no such alternative exists.

```csharp
[Fact]
public void TestsSomething()
{
Assert.SkipWhen(true, reason: "skip this when true"); // <- this should not raise an analyzer FAA0002 issue.

// Arrange
// ...

// Act
var result = true;

// Assert
result.Should().BeFalse();
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the implementation and tests for diagnostic FAA0002, then reproduce the example using xUnit 3's Assert.SkipWhen. Update the analyzer behavior so Assert.Skip... calls do not raise FAA0002, and add a regression test confirming the diagnostic is absent while applicable Fluent Assertions guidance remains covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.