Skip to content

Commit 12f1cfd

Browse files
committed
build(deps): Bump SonarAnalyzer.CSharp from 9.7.0.75501 to 9.9.0.77355
1 parent 025edb0 commit 12f1cfd

File tree

6 files changed

+15
-17
lines changed

6 files changed

+15
-17
lines changed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<!-- Shared code analyzers used for all projects in the solution -->
5252
<ItemGroup Label="Code Analyzers">
5353
<PackageReference Include="AsyncFixer" Version="1.6.0" PrivateAssets="All" />
54-
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.7.0.75501" PrivateAssets="All" />
54+
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.9.0.77355" PrivateAssets="All" />
5555
</ItemGroup>
5656

5757
<ItemGroup Label="Implicit usings"

src/bunit.web/JSInterop/InvocationHandlers/Implementation/VirtualizeJSRuntimeInvocationHandler.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,10 @@ internal sealed class VirtualizeJSRuntimeInvocationHandler : JSRuntimeInvocation
2424

2525
var dotNetObjectReferenceVirtualizeJsInteropType = typeof(DotNetObjectReference<>).MakeGenericType(virtualizeJsInteropType);
2626

27-
var dotNetObjectReferenceValuePropertyInfo = dotNetObjectReferenceVirtualizeJsInteropType
28-
.GetProperty("Value", BindingFlags.Public | BindingFlags.Instance)
27+
var dotNetObjectReferenceValuePropertyInfo = dotNetObjectReferenceVirtualizeJsInteropType.GetProperty("Value", BindingFlags.Public | BindingFlags.Instance)
2928
?? throw new InvalidOperationException("Did not find the Value property on the DotNetObjectReference<VirtualizeJsInterop> type.");
3029

31-
var onSpacerBeforeVisibleMethodInfo = virtualizeJsInteropType?.GetMethod("OnSpacerBeforeVisible")
30+
var onSpacerBeforeVisibleMethodInfo = virtualizeJsInteropType.GetMethod("OnSpacerBeforeVisible")
3231
?? throw new InvalidOperationException("Did not find the OnSpacerBeforeVisible method on the VirtualizeJsInterop type.");
3332

3433
return (dotNetObjectReferenceValuePropertyInfo, onSpacerBeforeVisibleMethodInfo);

tests/bunit.web.testcomponents.tests/RazorTesting/RazorTestSourceInformationProviderTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ public void Test001(Type target, int testNumber, int expectedLineNumber)
3232
var sourceInfo = sut.GetSourceInformation(target, GetTest(target, testNumber), testNumber);
3333

3434
sourceInfo.ShouldNotBeNull();
35-
sourceInfo?.FileName.ShouldEndWith($"SampleComponents{Path.DirectorySeparatorChar}{target.Name}.razor", Case.Insensitive);
36-
sourceInfo?.LineNumber.ShouldBe(expectedLineNumber);
35+
sourceInfo.FileName.ShouldEndWith($"SampleComponents{Path.DirectorySeparatorChar}{target.Name}.razor", Case.Insensitive);
36+
sourceInfo.LineNumber.ShouldBe(expectedLineNumber);
3737
}
3838

3939
public void Dispose() => renderer.Dispose();

tests/bunit.web.testcomponents.tests/bunit.web.testcomponents.tests.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
<!-- some test fails with > 4.1.0 -->
1616
<NoWarn>NU1605</NoWarn>
1717
</PackageReference>
18-
<PackageReference Update="SonarAnalyzer.CSharp" Version="9.7.0.75501" />
1918
</ItemGroup>
2019

2120
<ItemGroup>

tests/bunit.web.tests/TestDoubles/Authorization/FakeAuthenticationStateProviderTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ public async Task Test001()
1515
// assert
1616
Assert.NotNull(authState.User);
1717
Assert.NotNull(authState.User.Identity);
18-
Assert.Equal("TestUser", authState?.User?.Identity?.Name);
19-
Assert.True(authState?.User?.Identity?.IsAuthenticated);
18+
Assert.Equal("TestUser", authState.User?.Identity?.Name);
19+
Assert.True(authState.User?.Identity?.IsAuthenticated);
2020
}
2121

2222
[Fact(DisplayName = "Create unauthenticated AuthenticationState")]

tests/bunit.web.tests/TestDoubles/Authorization/FakeAuthorizationPolicyProviderTest.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ public async Task Test003()
4545

4646
// assert
4747
Assert.NotNull(policy);
48-
Assert.Equal(1, policy?.AuthenticationSchemes?.Count);
49-
Assert.Equal("TestScheme:FooBar", policy?.AuthenticationSchemes?[0]);
50-
Assert.Equal(1, policy?.Requirements?.Count);
51-
Assert.IsType<TestPolicyRequirement>(policy?.Requirements?[0]);
48+
Assert.Equal(1, policy.AuthenticationSchemes?.Count);
49+
Assert.Equal("TestScheme:FooBar", policy.AuthenticationSchemes?[0]);
50+
Assert.Equal(1, policy.Requirements?.Count);
51+
Assert.IsType<TestPolicyRequirement>(policy.Requirements?[0]);
5252
}
5353

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

6464
// assert
6565
Assert.NotNull(policy);
66-
Assert.Equal(1, policy?.AuthenticationSchemes?.Count);
67-
Assert.Equal("TestScheme:OtherPolicy", policy?.AuthenticationSchemes?[0]);
68-
Assert.Equal(1, policy?.Requirements?.Count);
69-
Assert.IsType<TestPolicyRequirement>(policy?.Requirements?[0]);
66+
Assert.Equal(1, policy.AuthenticationSchemes?.Count);
67+
Assert.Equal("TestScheme:OtherPolicy", policy.AuthenticationSchemes?[0]);
68+
Assert.Equal(1, policy.Requirements?.Count);
69+
Assert.IsType<TestPolicyRequirement>(policy.Requirements?[0]);
7070
}
7171

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

0 commit comments

Comments
 (0)