Closed Alxandr closed 2 months ago
@Alxandr which IDE are you using? rider? I'm not seeing any special annotation in the unit library for the NotNull
assertion. https://github.com/nunit/nunit/blob/6d6a424626ffc21cbb636016d6c804efe4bfbb3c/src/NUnitFramework/nunit.framework.legacy/Assert.Conditions.cs#L205
@Alxandr I think this is discussed here https://github.com/fluentassertions/fluentassertions/issues/1074 As I understand this will be supported in fluentassertions v7 - https://github.com/fluentassertions/fluentassertions/pull/2380
Yeah - it seems that v7 will get around the issue by cheating. I guess this is a reasonable compromise given that nullability doesn't really support the API of fluent assertions.
I still think being able to toggle of individual "upgrade" lints for flutentassertions would be a good feature to have - but may be less needed.
@Alxandr I forgot that this is already supported, see #376
Oh, nice :). Is this feature already released?
@Alxandr the configuration used the old name, just released https://github.com/fluentassertions/fluentassertions.analyzers/releases/tag/v0.33.0 that matches the new Configuration docs
Description
Assert.NotNull
from xunit has annotations that .NET. This method is thus not just to convert in the same vein as most other xunit assertions.Complete minimal example reproducing the issue
This is fine, but if I change the
Assert.NotNull
per fluent-assertions suggestion tosubject.Should().NotBeNull()
, I get a compiler-warning on the property access.