Description
AssertAreEqual analyzer does not seem to trigger if the expected value is null.
Complete minimal example reproducing the issue
namespace TestProject
{
using Microsoft.VisualStudio.TestTools.UnitTesting;
[TestClass]
public class UnitTest
{
[TestMethod]
public void TestMethod1()
{
int? x = null;
Assert.AreEqual(5, x); // WORKS
Assert.AreEqual(null, x); // DOES NOT WORK
}
}
}
Expected behavior:
Analyzer triggers and suggests to use fluent assertions.
Actual behavior:
Analyzer does not show a suggestion.
Versions
- Which version of Fluent Assertions Analyzers are you using? 0.17.2
- Which .NET runtime and version are you targeting? .NET 6.0.