Skip to content

Commit 3983ad0

Browse files
committed
Fix nullability.
1 parent ae9db69 commit 3983ad0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Components/Components/test/NavigationManagerTest.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
using Microsoft.AspNetCore.Components.Routing;
99
using Microsoft.AspNetCore.InternalTesting;
1010

11-
#nullable enable
12-
1311
namespace Microsoft.AspNetCore.Components;
1412

1513
public class NavigationManagerTest
@@ -892,6 +890,7 @@ public void OnNotFoundSubscriptionIsTriggeredWhenNotFoundCalled()
892890
[Fact]
893891
public void OnNavigateToCallback_WhenThrows_ShouldBeHandledGracefully()
894892
{
893+
#nullable enable
895894
// Arrange
896895
var baseUri = "scheme://host/";
897896
var uri = "scheme://host/test";
@@ -917,6 +916,7 @@ async Task ThrowingMethod(string param)
917916
await Task.Yield();
918917
throw expectedException;
919918
}
919+
#nullable restore
920920
}
921921

922922
private class TestNavigationManager : NavigationManager
@@ -981,7 +981,9 @@ public void Initialize(string baseUri, string uri, Func<string, Task> onNavigate
981981
_onNavigateToCallback = onNavigateTo;
982982
}
983983

984+
#nullable enable
984985
public Exception? TriggerOnNavigateToCallback(string uri)
986+
#nullable restore
985987
{
986988
try
987989
{

0 commit comments

Comments
 (0)