diff --git a/Directory.Packages.props b/Directory.Packages.props index 771d56186f..0f66307b56 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,9 +6,9 @@ 8.2.2 17.11.4 - 3.11.0-beta1.24508.2 + 3.11.0-beta1.24527.2 3.11.0 - 4.8.0 + 4.10.0 $(MicrosoftCodeAnalysisAnalyzersVersion) $(MicrosoftCodeAnalysisPublicApiAnalyzersVersion) diff --git a/src/Analyzers/MSTest.Analyzers/DoNotNegateBooleanAssertionAnalyzer.cs b/src/Analyzers/MSTest.Analyzers/DoNotNegateBooleanAssertionAnalyzer.cs index e46bf0cb56..728fc20957 100644 --- a/src/Analyzers/MSTest.Analyzers/DoNotNegateBooleanAssertionAnalyzer.cs +++ b/src/Analyzers/MSTest.Analyzers/DoNotNegateBooleanAssertionAnalyzer.cs @@ -59,7 +59,7 @@ private static void AnalyzeOperation(OperationAnalysisContext context, INamedTyp IArgumentOperation? conditionArgument = invocationOperation.Arguments.FirstOrDefault(x => x.Parameter?.Name == "condition"); if (conditionArgument != null - && conditionArgument.Children.Any(op => op is IUnaryOperation { OperatorKind: UnaryOperatorKind.Not })) + && conditionArgument.Value is IUnaryOperation { OperatorKind: UnaryOperatorKind.Not }) { context.ReportDiagnostic(invocationOperation.CreateDiagnostic(Rule)); }