Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S2222: Branch on createdNew parameter on Mutex constructor #6994

Merged
merged 16 commits into from
Apr 3, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix code smells
  • Loading branch information
martin-strecker-sonarsource committed Apr 3, 2023
commit 87aa44e14af121d2a89afc0fe8d6747ec9af9253
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
using SonarAnalyzer.UnitTest;
using StyleCop.Analyzers.Lightup;

namespace SonarAnalyzer.UnitTest.SymbolicExecution.Roslyn;

[TestClass]
public class IInvocationOperationExtensionsTest
{
Expand All @@ -39,7 +41,6 @@ static void M(string stringParam)
var (tree, model) = TestHelper.CompileCS(testClass);
var invocation = tree.GetRoot().DescendantNodesAndSelf().OfType<InvocationExpressionSyntax>().Single();
var operation = IInvocationOperationWrapper.FromOperation(model.GetOperation(invocation));
var argument = operation.ArgumentValue("stringParam").Should().NotBeNull().And.BeAssignableTo<IOperation>().Which.ConstantValue.Value.Should().Be("param");
operation.ArgumentValue("stringParam").Should().NotBeNull().And.BeAssignableTo<IOperation>().Which.ConstantValue.Value.Should().Be("param");
}

}