Skip to content

Upgrade xunit version to 2.9.0 #57303

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

Merged
merged 23 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ff6bfd0
Upgrade Xunit version to 2.9.0
akoeplinger Aug 6, 2024
3f15319
React to removed/changed xunit exceptions
akoeplinger Aug 6, 2024
652eae7
Fix ambiguous calls
akoeplinger Aug 6, 2024
1c1bf4e
Replace Assert.True(false, ...) with Assert.Fail
akoeplinger Aug 13, 2024
b9c8808
Await async methods and change async void -> async Task
akoeplinger Aug 13, 2024
84830f7
Use Assert.Equal for string equality checks
akoeplinger Aug 6, 2024
4bd22b5
Apply analyzer fixes: use Assert.Single and Assert.Empty
akoeplinger Aug 13, 2024
66c9c4d
Apply analyzer fixes: null parameter in Theory data
akoeplinger Aug 6, 2024
17369c4
Fix TheoryData generic mismatch
akoeplinger Aug 6, 2024
20d02bd
Test methods can't return value
akoeplinger Aug 6, 2024
84260ba
Suppress Do not call ConfigureAwait(false) in test method
akoeplinger Aug 13, 2024
57f1c8c
Suppress Do not use blocking task operations in test method
akoeplinger Aug 13, 2024
085f2bf
Suppress Fixture arguments to test classes must have fixture sources
akoeplinger Aug 6, 2024
408d6f5
Fix DllNotFoundException in HttpApi on non-Windows platforms
akoeplinger Aug 13, 2024
af9d4c4
Disable tests that were unintentionally skipped before and fail now
akoeplinger Aug 13, 2024
0e09973
Fix generated test code
akoeplinger Aug 13, 2024
cbfce49
Disable generated tests that were unintentionally skipped before and …
akoeplinger Aug 13, 2024
01018a5
Add issue link to ResultsOfTTests.Generated.cs
akoeplinger Aug 16, 2024
e449994
Add issue link to UserManagerTest.cs
akoeplinger Aug 16, 2024
0be628b
Disable xUnit1030 globally
akoeplinger Aug 16, 2024
9f3583b
Move check for HttpApi into test code
akoeplinger Aug 21, 2024
6ee95dc
Merge remote-tracking branch 'origin/main' into upgrade-xunit
akoeplinger Aug 23, 2024
f930b17
Revert changes to ResultsOfTTests, they were fixed
akoeplinger Aug 23, 2024
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
3 changes: 3 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@
<!-- xUnit1004 = warns about skipped tests. Make this a non-fatal build warning. -->
<WarningsNotAsErrors>$(WarningsNotAsErrors);xUnit1004</WarningsNotAsErrors>

<!-- don't warn about calling ConfigureAwait in test methods. we already commonly get off the xunit threads because they cause issues. -->
<NoWarn>$(NoWarn);xUnit1030</NoWarn>

<!-- don't warn about unnecessary trim warning suppressions. can be removed with preview 6. -->
<NoWarn>$(NoWarn);IL2121</NoWarn>

Expand Down
6 changes: 3 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,12 @@
<SwashbuckleAspNetCoreVersion>6.6.2</SwashbuckleAspNetCoreVersion>
<VerifyXunitVersion>19.14.0</VerifyXunitVersion>
<XunitAbstractionsVersion>2.0.3</XunitAbstractionsVersion>
<XunitAnalyzersVersion>1.0.0</XunitAnalyzersVersion>
<XunitVersion>2.4.2</XunitVersion>
<XunitAnalyzersVersion>1.15.0</XunitAnalyzersVersion>
<XunitVersion>2.9.0</XunitVersion>
<XunitAssertVersion>$(XunitVersion)</XunitAssertVersion>
<XunitExtensibilityCoreVersion>$(XunitVersion)</XunitExtensibilityCoreVersion>
<XunitExtensibilityExecutionVersion>$(XunitVersion)</XunitExtensibilityExecutionVersion>
<XUnitRunnerVisualStudioVersion>2.4.3</XUnitRunnerVisualStudioVersion>
<XUnitRunnerVisualStudioVersion>2.8.2</XUnitRunnerVisualStudioVersion>
<MicrosoftDataSqlClientVersion>4.0.5</MicrosoftDataSqlClientVersion>
<MicrosoftOpenApiVersion>1.6.17</MicrosoftOpenApiVersion>
<MicrosoftOpenApiReadersVersion>1.6.17</MicrosoftOpenApiReadersVersion>
Expand Down
18 changes: 2 additions & 16 deletions src/Analyzers/Microsoft.AspNetCore.Analyzer.Testing/src/Assert.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static void DiagnosticLocation(DiagnosticLocation expected, Location actu
{
if (actualLinePosition.Line + 1 != expected.Line)
{
throw new DiagnosticLocationAssertException(
throw EqualException.ForMismatchedValues(
expected,
actual,
$"Expected diagnostic to be on line \"{expected.Line}\" was actually on line \"{actualLinePosition.Line + 1}\"");
Expand All @@ -30,25 +30,11 @@ public static void DiagnosticLocation(DiagnosticLocation expected, Location actu
{
if (actualLinePosition.Character + 1 != expected.Column)
{
throw new DiagnosticLocationAssertException(
throw EqualException.ForMismatchedValues(
expected,
actual,
$"Expected diagnostic to start at column \"{expected.Column}\" was actually on column \"{actualLinePosition.Character + 1}\"");
}
}
}

private sealed class DiagnosticLocationAssertException : EqualException
{
public DiagnosticLocationAssertException(
DiagnosticLocation expected,
Location actual,
string message)
: base(expected, actual)
{
Message = message;
}

public override string Message { get; }
}
}
4 changes: 2 additions & 2 deletions src/Antiforgery/test/BinaryBlobTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ public void Ctor_Data()
[Theory]
[InlineData((object[]?)null)]
[InlineData(new byte[] { 0x01, 0x02, 0x03 })]
public void Ctor_Data_Bad(byte[] data)
public void Ctor_Data_Bad(byte[]? data)
{
// Act & assert
var ex = Assert.Throws<ArgumentOutOfRangeException>(() => new BinaryBlob(32, data));
var ex = Assert.Throws<ArgumentOutOfRangeException>(() => new BinaryBlob(32, data!));
Assert.Equal("data", ex.ParamName);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Antiforgery/test/DefaultAntiforgeryTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ public void SetCookieTokenAndHeader_OverridesExistingCachingHeaders()
[InlineData(true, null)]
public void SetCookieTokenAndHeader_AddsXFrameOptionsHeader(
bool suppressXFrameOptions,
string expectedHeaderValue)
string? expectedHeaderValue)
{
// Arrange
var options = new AntiforgeryOptions()
Expand Down
2 changes: 1 addition & 1 deletion src/Antiforgery/test/DefaultAntiforgeryTokenStoreTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ public void SaveCookieToken_HonorsCookieSecurePolicy_OnOptions(
[InlineData("/", "/")]
[InlineData("/vdir1", "/vdir1")]
[InlineData("/vdir1/vdir2", "/vdir1/vdir2")]
public void SaveCookieToken_SetsCookieWithApproriatePathBase(string requestPathBase, string expectedCookiePath)
public void SaveCookieToken_SetsCookieWithApproriatePathBase(string? requestPathBase, string expectedCookiePath)
{
// Arrange
var token = "serialized-value";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private void VerifyFix(string language, DiagnosticAnalyzer analyzer, CodeFixProv
document = document.WithSyntaxRoot(Formatter.Format(document.GetSyntaxRootAsync().Result, Formatter.Annotation, document.Project.Solution.Workspace));
newCompilerDiagnostics = GetNewDiagnostics(compilerDiagnostics, GetCompilerDiagnostics(document));

Assert.True(false,
Assert.Fail(
string.Format(
CultureInfo.InvariantCulture,
"Fix introduced new compiler diagnostics:\r\n{0}\r\n\r\nNew document:\r\n{1}\r\n",
Expand Down
16 changes: 8 additions & 8 deletions src/Components/Analyzers/test/Verifiers/DiagnosticVerifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ private static void VerifyDiagnosticResults(IEnumerable<Diagnostic> actualResult
{
string diagnosticsOutput = actualResults.Any() ? FormatDiagnostics(analyzer, actualResults.ToArray()) : " NONE.";

Assert.True(false,
Assert.Fail(
string.Format(CultureInfo.InvariantCulture, "Mismatch between number of diagnostics returned, expected \"{0}\" actual \"{1}\"\r\n\r\nDiagnostics:\r\n{2}\r\n", expectedCount, actualCount, diagnosticsOutput));
}

Expand All @@ -125,7 +125,7 @@ private static void VerifyDiagnosticResults(IEnumerable<Diagnostic> actualResult
{
if (actual.Location != Location.None)
{
Assert.True(false,
Assert.Fail(
string.Format(CultureInfo.InvariantCulture, "Expected:\nA project diagnostic with No location\nActual:\n{0}",
FormatDiagnostics(analyzer, actual)));
}
Expand All @@ -137,7 +137,7 @@ private static void VerifyDiagnosticResults(IEnumerable<Diagnostic> actualResult

if (additionalLocations.Length != expected.Locations.Length - 1)
{
Assert.True(false,
Assert.Fail(
string.Format(
CultureInfo.InvariantCulture,
"Expected {0} additional locations but got {1} for Diagnostic:\r\n {2}\r\n",
Expand All @@ -153,7 +153,7 @@ private static void VerifyDiagnosticResults(IEnumerable<Diagnostic> actualResult

if (actual.Id != expected.Id)
{
Assert.True(false,
Assert.Fail(
string.Format(
CultureInfo.InvariantCulture,
"Expected diagnostic id to be \"{0}\" was \"{1}\"\r\n\r\nDiagnostic:\r\n {2}\r\n",
Expand All @@ -162,7 +162,7 @@ private static void VerifyDiagnosticResults(IEnumerable<Diagnostic> actualResult

if (actual.Severity != expected.Severity)
{
Assert.True(false,
Assert.Fail(
string.Format(
CultureInfo.InvariantCulture,
"Expected diagnostic severity to be \"{0}\" was \"{1}\"\r\n\r\nDiagnostic:\r\n {2}\r\n",
Expand All @@ -171,7 +171,7 @@ private static void VerifyDiagnosticResults(IEnumerable<Diagnostic> actualResult

if (actual.GetMessage(CultureInfo.InvariantCulture) != expected.Message)
{
Assert.True(false,
Assert.Fail(
string.Format(
CultureInfo.InvariantCulture,
"Expected diagnostic message to be \"{0}\" was \"{1}\"\r\n\r\nDiagnostic:\r\n {2}\r\n",
Expand Down Expand Up @@ -204,7 +204,7 @@ private static void VerifyDiagnosticLocation(DiagnosticAnalyzer analyzer, Diagno
{
if (actualLinePosition.Line + 1 != expected.Line)
{
Assert.True(false,
Assert.Fail(
string.Format(
CultureInfo.InvariantCulture,
"Expected diagnostic to be on line \"{0}\" was actually on line \"{1}\"\r\n\r\nDiagnostic:\r\n {2}\r\n",
Expand All @@ -217,7 +217,7 @@ private static void VerifyDiagnosticLocation(DiagnosticAnalyzer analyzer, Diagno
{
if (actualLinePosition.Character + 1 != expected.Column)
{
Assert.True(false,
Assert.Fail(
string.Format(
CultureInfo.InvariantCulture,
"Expected diagnostic to start at column \"{0}\" was actually at column \"{1}\"\r\n\r\nDiagnostic:\r\n {2}\r\n",
Expand Down
6 changes: 3 additions & 3 deletions src/Components/Authorization/test/AuthorizeViewTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ public async Task RendersAuthorizingUntilAuthorizationCompletedAsync()
// (This wouldn't happen under the sync context or in wasm)
var renderTcs = new TaskCompletionSource();
renderer.OnUpdateDisplayComplete = () => renderTcs.SetResult();
authTcs.SetResult(CreateAuthenticationState("Monsieur").Result);
authTcs.SetResult(await CreateAuthenticationState("Monsieur"));

await renderTcs.Task;
Assert.Equal(2, renderer.Batches.Count);
Expand All @@ -347,7 +347,7 @@ public async Task RendersAuthorizingUntilAuthorizationCompletedAsync()
}

[Fact]
public void RendersAuthorizingUntilAuthorizationCompleted()
public async Task RendersAuthorizingUntilAuthorizationCompleted()
{
// Arrange
var @event = new ManualResetEventSlim();
Expand Down Expand Up @@ -377,7 +377,7 @@ public void RendersAuthorizingUntilAuthorizationCompleted()

// Act/Assert 2: Auth process completes asynchronously
@event.Reset();
authTcs.SetResult(CreateAuthenticationState("Monsieur").Result);
authTcs.SetResult(await CreateAuthenticationState("Monsieur"));

// We need to wait here because the continuations of SetResult will be scheduled to run asynchronously.
@event.Wait(Timeout);
Expand Down
4 changes: 2 additions & 2 deletions src/Components/Components/test/LayoutViewTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public void CanChangeContentWithSameLayout()
// Assert
Assert.Equal(2, _renderer.Batches.Count);
var batch = _renderer.Batches[1];
Assert.Equal(0, batch.DisposedComponentIDs.Count);
Assert.Empty(batch.DisposedComponentIDs);
Assert.Collection(batch.DiffsInOrder,
diff => Assert.Empty(diff.Edits), // LayoutView rerendered, but with no changes
diff => Assert.Empty(diff.Edits), // RootLayout rerendered, but with no changes
Expand Down Expand Up @@ -220,7 +220,7 @@ public void CanChangeLayout()
Assert.True(setParametersTask2.IsCompletedSuccessfully);
Assert.Equal(2, _renderer.Batches.Count);
var batch = _renderer.Batches[1];
Assert.Equal(1, batch.DisposedComponentIDs.Count); // Disposes NestedLayout
Assert.Single(batch.DisposedComponentIDs); // Disposes NestedLayout
Assert.Collection(batch.DiffsInOrder,
diff => Assert.Empty(diff.Edits), // LayoutView rerendered, but with no changes
diff =>
Expand Down
24 changes: 22 additions & 2 deletions src/Components/Components/test/NavigationManagerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ public void LocationChangingHandlers_CanContinueTheNavigationSynchronously_WhenO

// Assert
Assert.True(navigation1.IsCompletedSuccessfully);
#pragma warning disable xUnit1031 // Do not use blocking task operations in test method
Assert.True(navigation1.Result);
#pragma warning restore xUnit1031 // Do not use blocking task operations in test method

static ValueTask HandleLocationChanging(LocationChangingContext context)
{
Expand All @@ -250,7 +252,9 @@ public void LocationChangingHandlers_CanContinueTheNavigationSynchronously_WhenM

// Assert
Assert.True(navigation1.IsCompletedSuccessfully);
#pragma warning disable xUnit1031 // Do not use blocking task operations in test method
Assert.True(navigation1.Result);
#pragma warning restore xUnit1031 // Do not use blocking task operations in test method
Assert.Equal(initialHandlerCount, completedHandlerCount);

ValueTask HandleLocationChanging(LocationChangingContext context)
Expand All @@ -276,7 +280,9 @@ public void LocationChangingHandlers_CanContinueTheNavigationAsynchronously_When
Assert.False(navigation1.IsCompleted);
tcs.SetResult();
Assert.True(navigation1.IsCompletedSuccessfully);
#pragma warning disable xUnit1031 // Do not use blocking task operations in test method
Assert.True(navigation1.Result);
#pragma warning restore xUnit1031 // Do not use blocking task operations in test method

async ValueTask HandleLocationChanging(LocationChangingContext context)
{
Expand Down Expand Up @@ -328,7 +334,9 @@ public void LocationChangingHandlers_CanCancelTheNavigationSynchronously_WhenOne

// Assert
Assert.True(navigation1.IsCompletedSuccessfully);
#pragma warning disable xUnit1031 // Do not use blocking task operations in test method
Assert.False(navigation1.Result);
#pragma warning restore xUnit1031 // Do not use blocking task operations in test method

static ValueTask HandleLocationChanging(LocationChangingContext context)
{
Expand Down Expand Up @@ -357,7 +365,9 @@ public void LocationChangingHandlers_CanCancelTheNavigationSynchronously_WhenMul

// Assert
Assert.True(navigation1.IsCompletedSuccessfully);
#pragma warning disable xUnit1031 // Do not use blocking task operations in test method
Assert.False(navigation1.Result);
#pragma warning restore xUnit1031 // Do not use blocking task operations in test method
Assert.Equal(expectedInvokedHandlerCount, invokedHandlerCount);

ValueTask HandleLocationChanging_AllowNavigation(LocationChangingContext context)
Expand Down Expand Up @@ -391,7 +401,9 @@ public void LocationChangingHandlers_CanCancelTheNavigationSynchronously_BeforeR

// Assert
Assert.True(navigation1.IsCompletedSuccessfully);
#pragma warning disable xUnit1031 // Do not use blocking task operations in test method
Assert.False(navigation1.Result);
#pragma warning restore xUnit1031 // Do not use blocking task operations in test method
Assert.True(currentContext.DidPreventNavigation);
Assert.True(currentContext.CancellationToken.IsCancellationRequested);
Assert.False(isHandlerCompleted);
Expand Down Expand Up @@ -428,7 +440,9 @@ public void LocationChangingHandlers_CanCancelTheNavigationSynchronously_BeforeR

// Assert
Assert.True(navigation1.IsCompletedSuccessfully);
#pragma warning disable xUnit1031 // Do not use blocking task operations in test method
Assert.False(navigation1.Result);
#pragma warning restore xUnit1031 // Do not use blocking task operations in test method
Assert.True(currentContext.DidPreventNavigation);
Assert.True(currentContext.CancellationToken.IsCancellationRequested);
Assert.False(isFirstHandlerCompleted);
Expand All @@ -455,7 +469,7 @@ ValueTask HandleLocationChanging_AllowNavigation(LocationChangingContext context
}

[Fact]
public async void LocationChangingHandlers_CanCancelTheNavigationAsynchronously_WhenOneHandlerIsRegistered()
public async Task LocationChangingHandlers_CanCancelTheNavigationAsynchronously_WhenOneHandlerIsRegistered()
{
// Arrange
var baseUri = "scheme://host/";
Expand All @@ -479,7 +493,7 @@ static async ValueTask HandleLocationChanging(LocationChangingContext context)
}

[Fact]
public async void LocationChangingHandlers_CanCancelTheNavigationAsynchronously_WhenMultipleHandlersAreRegistered()
public async Task LocationChangingHandlers_CanCancelTheNavigationAsynchronously_WhenMultipleHandlersAreRegistered()
{
// Arrange
var baseUri = "scheme://host/";
Expand All @@ -503,7 +517,9 @@ public async void LocationChangingHandlers_CanCancelTheNavigationAsynchronously_

// Assert
Assert.True(navigation1.IsCompletedSuccessfully);
#pragma warning disable xUnit1031 // Do not use blocking task operations in test method
Assert.False(navigation1.Result);
#pragma warning restore xUnit1031 // Do not use blocking task operations in test method
Assert.Equal(blockNavigationHandlerCount, canceledBlockNavigationHandlerCount);

async ValueTask HandleLocationChanging_BlockNavigation(LocationChangingContext context)
Expand Down Expand Up @@ -556,11 +572,13 @@ public async Task LocationChangingHandlers_AreCanceledBySuccessiveNavigations_Wh
await tcs.Task.WaitAsync(Timeout);

// Assert
#pragma warning disable xUnit1031 // Do not use blocking task operations in test method
Assert.True(navigation1.IsCompletedSuccessfully);
Assert.False(navigation1.Result);

Assert.True(navigation2.IsCompletedSuccessfully);
Assert.True(navigation2.Result);
#pragma warning restore xUnit1031 // Do not use blocking task operations in test method

async ValueTask HandleLocationChanging(LocationChangingContext context)
{
Expand Down Expand Up @@ -615,6 +633,7 @@ public async Task LocationChangingHandlers_AreCanceledBySuccessiveNavigations_Wh
await tcs.Task.WaitAsync(Timeout);

// Assert
#pragma warning disable xUnit1031 // Do not use blocking task operations in test method
Assert.True(navigation1.IsCompletedSuccessfully);
Assert.False(navigation1.Result);

Expand All @@ -623,6 +642,7 @@ public async Task LocationChangingHandlers_AreCanceledBySuccessiveNavigations_Wh

Assert.True(navigation3.IsCompletedSuccessfully);
Assert.True(navigation3.Result);
#pragma warning restore xUnit1031 // Do not use blocking task operations in test method

Assert.Equal(expectedCanceledHandlerCount, canceledHandlerCount);
Assert.Equal(0, completedHandlerCount);
Expand Down
6 changes: 3 additions & 3 deletions src/Components/Components/test/RendererTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3065,8 +3065,8 @@ public void QueuedRenderIsSkippedIfComponentWasAlreadyDisposedInSameBatch()
// Assert: correct render result
Assert.True(renderTask.IsCompletedSuccessfully);
var newBatch = renderer.Batches.Skip(1).Single();
Assert.Equal(1, newBatch.DisposedComponentIDs.Count);
Assert.Equal(1, newBatch.DiffsByComponentId.Count);
Assert.Single(newBatch.DisposedComponentIDs);
Assert.Single(newBatch.DiffsByComponentId);
Assert.Collection(newBatch.DiffsByComponentId[componentId].Single().Edits,
edit =>
{
Expand Down Expand Up @@ -3433,7 +3433,7 @@ public void DoesNotCallOnAfterRenderForComponentsNotRendered()
// Assert: Only the re-rendered component was notified of "after render"
var batch2 = renderer.Batches.Skip(1).Single();
Assert.Equal(2, batch2.DiffsInOrder.Count); // Parent and first child
Assert.Equal(1, batch2.DisposedComponentIDs.Count); // Third child
Assert.Single(batch2.DisposedComponentIDs); // Third child
Assert.Equal(2, childComponents[0].OnAfterRenderCallCount); // Retained and re-rendered
Assert.Equal(1, childComponents[1].OnAfterRenderCallCount); // Retained and not re-rendered
Assert.Equal(1, childComponents[2].OnAfterRenderCallCount); // Disposed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public void CanCreateResourceCollection()
var collectionAsReadOnlyList = resourceAssetCollection as IReadOnlyList<ResourceAsset>;

// Assert
Assert.Equal(1, collectionAsReadOnlyList.Count);
Assert.Single(collectionAsReadOnlyList);
Assert.Equal("image1.jpg", collectionAsReadOnlyList[0].Url);
}

Expand Down
4 changes: 2 additions & 2 deletions src/Components/Components/test/Routing/RouterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public async Task AlreadyCanceledOnNavigateAsyncDoesNothing()
Assert.True(true);
return;
}
Assert.True(false, "OnUpdateDisplay called more than once.");
Assert.Fail("OnUpdateDisplay called more than once.");
};
_router.OnNavigateAsync = new EventCallback<NavigationContext>(null, OnNavigateAsync);

Expand Down Expand Up @@ -164,7 +164,7 @@ public async Task RefreshesOnceOnCancelledOnNavigateAsync()
Assert.True(true);
return;
}
Assert.True(false, "OnUpdateDisplay called more than once.");
Assert.Fail("OnUpdateDisplay called more than once.");
};
_router.OnNavigateAsync = new EventCallback<NavigationContext>(null, OnNavigateAsync);

Expand Down
Loading
Loading