[bug] Code fix for NUnit2005 does not correctly fix Assert.AreEqual if named parameters are used in unexpected order
Given the following (note the order of named parameters)
[Test]
public void Test1()
{
var actual = 1;
Assert.AreEqual(actual: actual, expected: 1);
}
NUnit.Analyzers cannot fix NUnit2005 correctly.
The above should suffice, but I also created a repo: https://github.com/Bartleby2718/NUnit2005-Assert-AreEqual-repro
I guess we need to add some logic to ClassicModelAssertUsageCodeFix, so it will use NameColon if it is supplied, then this will also fix the same issue in other codefixes deriving from this base-class. I'll see if I have time for this next week.
@mikkelbu I just filed a PR for this!
@mikkelbu @manfred-brands Can you assign this issue and the corresponding PR to me?
@Bartleby2718 Done. I'm in the process of reviewing your PR.