Skip to content

Commit

Permalink
build(deps): Bump SonarAnalyzer.CSharp from 9.7.0.75501 to 9.9.0.77355
Browse files Browse the repository at this point in the history
  • Loading branch information
egil committed Sep 5, 2023
1 parent 025edb0 commit 12f1cfd
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<!-- Shared code analyzers used for all projects in the solution -->
<ItemGroup Label="Code Analyzers">
<PackageReference Include="AsyncFixer" Version="1.6.0" PrivateAssets="All" />
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.7.0.75501" PrivateAssets="All" />
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.9.0.77355" PrivateAssets="All" />
</ItemGroup>

<ItemGroup Label="Implicit usings"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ internal sealed class VirtualizeJSRuntimeInvocationHandler : JSRuntimeInvocation
var dotNetObjectReferenceVirtualizeJsInteropType = typeof(DotNetObjectReference<>).MakeGenericType(virtualizeJsInteropType);
var dotNetObjectReferenceValuePropertyInfo = dotNetObjectReferenceVirtualizeJsInteropType
.GetProperty("Value", BindingFlags.Public | BindingFlags.Instance)
var dotNetObjectReferenceValuePropertyInfo = dotNetObjectReferenceVirtualizeJsInteropType.GetProperty("Value", BindingFlags.Public | BindingFlags.Instance)
?? throw new InvalidOperationException("Did not find the Value property on the DotNetObjectReference<VirtualizeJsInterop> type.");
var onSpacerBeforeVisibleMethodInfo = virtualizeJsInteropType?.GetMethod("OnSpacerBeforeVisible")
var onSpacerBeforeVisibleMethodInfo = virtualizeJsInteropType.GetMethod("OnSpacerBeforeVisible")
?? throw new InvalidOperationException("Did not find the OnSpacerBeforeVisible method on the VirtualizeJsInterop type.");
return (dotNetObjectReferenceValuePropertyInfo, onSpacerBeforeVisibleMethodInfo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public void Test001(Type target, int testNumber, int expectedLineNumber)
var sourceInfo = sut.GetSourceInformation(target, GetTest(target, testNumber), testNumber);

sourceInfo.ShouldNotBeNull();
sourceInfo?.FileName.ShouldEndWith($"SampleComponents{Path.DirectorySeparatorChar}{target.Name}.razor", Case.Insensitive);
sourceInfo?.LineNumber.ShouldBe(expectedLineNumber);
sourceInfo.FileName.ShouldEndWith($"SampleComponents{Path.DirectorySeparatorChar}{target.Name}.razor", Case.Insensitive);
sourceInfo.LineNumber.ShouldBe(expectedLineNumber);
}

public void Dispose() => renderer.Dispose();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<!-- some test fails with > 4.1.0 -->
<NoWarn>NU1605</NoWarn>
</PackageReference>
<PackageReference Update="SonarAnalyzer.CSharp" Version="9.7.0.75501" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ public async Task Test001()
// assert
Assert.NotNull(authState.User);
Assert.NotNull(authState.User.Identity);
Assert.Equal("TestUser", authState?.User?.Identity?.Name);
Assert.True(authState?.User?.Identity?.IsAuthenticated);
Assert.Equal("TestUser", authState.User?.Identity?.Name);
Assert.True(authState.User?.Identity?.IsAuthenticated);
}

[Fact(DisplayName = "Create unauthenticated AuthenticationState")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ public async Task Test003()

// assert
Assert.NotNull(policy);
Assert.Equal(1, policy?.AuthenticationSchemes?.Count);
Assert.Equal("TestScheme:FooBar", policy?.AuthenticationSchemes?[0]);
Assert.Equal(1, policy?.Requirements?.Count);
Assert.IsType<TestPolicyRequirement>(policy?.Requirements?[0]);
Assert.Equal(1, policy.AuthenticationSchemes?.Count);
Assert.Equal("TestScheme:FooBar", policy.AuthenticationSchemes?[0]);
Assert.Equal(1, policy.Requirements?.Count);
Assert.IsType<TestPolicyRequirement>(policy.Requirements?[0]);
}

[Fact(DisplayName = "Get policy based on name not in the PolicyProvider.")]
Expand All @@ -63,10 +63,10 @@ public async Task Test004()

// assert
Assert.NotNull(policy);
Assert.Equal(1, policy?.AuthenticationSchemes?.Count);
Assert.Equal("TestScheme:OtherPolicy", policy?.AuthenticationSchemes?[0]);
Assert.Equal(1, policy?.Requirements?.Count);
Assert.IsType<TestPolicyRequirement>(policy?.Requirements?[0]);
Assert.Equal(1, policy.AuthenticationSchemes?.Count);
Assert.Equal("TestScheme:OtherPolicy", policy.AuthenticationSchemes?[0]);
Assert.Equal(1, policy.Requirements?.Count);
Assert.IsType<TestPolicyRequirement>(policy.Requirements?[0]);
}

[Fact(DisplayName = "Set Policies with empty scheme name.")]
Expand Down

0 comments on commit 12f1cfd

Please sign in to comment.