Skip to content

Commit

Permalink
Update NunitAssertAnalyzerCodeFixProvider.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
jairbubbles committed Jan 23, 2024
1 parent 5f99a49 commit 6f76b3d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ private static async Task<Document> Rewrite(Document document, SyntaxNode nodeTo
{
result = rewrite.UsingShould(right, "Equal", ArgumentList(left, arguments.Skip(2)));
}
else if (leftType.SpecialType != SpecialType.System_String && leftType.IsReferenceType)
else if (leftType.Name == "Assembly" && leftType.ContainingNamespace.ToDisplayString() == "System.Reflection")
{
result = rewrite.UsingShould(right, "BeSameAs", ArgumentList(left, arguments.Skip(2)));
}
Expand Down Expand Up @@ -220,7 +220,7 @@ private static async Task<Document> Rewrite(Document document, SyntaxNode nodeTo
{
result = rewrite.UsingShould(right, "NotEqual", ArgumentList(left, arguments.Skip(2)));
}
else if (leftType.SpecialType != SpecialType.System_String && leftType.IsReferenceType)
else if (leftType.Name == "Assembly" && leftType.ContainingNamespace.ToDisplayString() == "System.Reflection")
{
result = rewrite.UsingShould(right, "NotBeSameAs", ArgumentList(left, arguments.Skip(2)));
}
Expand Down

0 comments on commit 6f76b3d

Please sign in to comment.