diff --git a/Directory.Packages.props b/Directory.Packages.props
index 433864ca8..f3926d7da 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -13,28 +13,39 @@
dotnet list package, include-transitive) so the ExplorerExtension companion exe and
the MAUI head share a single Microsoft.WindowsAppSDK version. -->
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/Integration/EventLogExpert.Runtime.IntegrationTests/Database/DatabaseServiceTests.cs b/tests/Integration/EventLogExpert.Runtime.IntegrationTests/Database/DatabaseServiceTests.cs
index dde942677..55fc05c74 100644
--- a/tests/Integration/EventLogExpert.Runtime.IntegrationTests/Database/DatabaseServiceTests.cs
+++ b/tests/Integration/EventLogExpert.Runtime.IntegrationTests/Database/DatabaseServiceTests.cs
@@ -878,7 +878,7 @@ public async Task ImportAsync_FreshlyImportedV4Db_ShouldDefaultDisabled_AndNotEn
Assert.Equal(DatabaseStatus.Ready, entry.Status);
preferences.Received().DisabledDatabasesPreference =
- Arg.Is>(disabled => disabled.Contains(Constants.TestDb1, StringComparer.OrdinalIgnoreCase));
+ Arg.Is>(disabled => disabled != null && disabled.Contains(Constants.TestDb1, StringComparer.OrdinalIgnoreCase));
}
[Fact]
@@ -914,7 +914,7 @@ public async Task ImportAsync_ReimportedDb_NotOnSkipList_ShouldOverwriteAndPrese
Assert.True(entry.IsEnabled);
preferences.DidNotReceive().DisabledDatabasesPreference =
- Arg.Is>(disabled => disabled.Contains(Constants.TestDb1, StringComparer.OrdinalIgnoreCase));
+ Arg.Is>(disabled => disabled != null && disabled.Contains(Constants.TestDb1, StringComparer.OrdinalIgnoreCase));
}
[Fact]
@@ -952,7 +952,7 @@ public async Task ImportAsync_ReimportedDb_OnSkipList_ShouldPreserveExistingFile
Assert.Equal(DatabaseStatus.Ready, entry.Status);
preferences.DidNotReceive().DisabledDatabasesPreference =
- Arg.Is>(disabled => disabled.Contains(Constants.TestDb1, StringComparer.OrdinalIgnoreCase));
+ Arg.Is>(disabled => disabled != null && disabled.Contains(Constants.TestDb1, StringComparer.OrdinalIgnoreCase));
}
[Fact]
@@ -2040,7 +2040,7 @@ public void Toggle_WhenCalled_ShouldFlipIsEnabledAndPersist()
Assert.False(service.Entries[0].IsEnabled);
preferences.Received(1).DisabledDatabasesPreference =
- Arg.Is>(disabled => disabled.Contains(Constants.TestDb1));
+ Arg.Is>(disabled => disabled != null && disabled.Contains(Constants.TestDb1));
}
[Fact]
diff --git a/tests/Integration/EventLogExpert.Runtime.IntegrationTests/FilterLibrary/FilterLibraryMigrationIntegrationTests.cs b/tests/Integration/EventLogExpert.Runtime.IntegrationTests/FilterLibrary/FilterLibraryMigrationIntegrationTests.cs
index 4bed7c808..cd67e3f5d 100644
--- a/tests/Integration/EventLogExpert.Runtime.IntegrationTests/FilterLibrary/FilterLibraryMigrationIntegrationTests.cs
+++ b/tests/Integration/EventLogExpert.Runtime.IntegrationTests/FilterLibrary/FilterLibraryMigrationIntegrationTests.cs
@@ -63,7 +63,7 @@ public async Task Migration_AddRangeThrows_LegacyDataPreserved_DispatchesLoadSuc
Assert.Empty(await realStore.LoadAllAsync(TestContext.Current.CancellationToken));
Assert.True(prefs.ContainsKey(FavoriteFiltersKey));
Assert.False(prefs.ContainsKey(MigrationSectionsKey));
- dispatcher.Received(1).Dispatch(Arg.Is(a => a.Entries.IsEmpty));
+ dispatcher.Received(1).Dispatch(Arg.Is(a => a != null && a.Entries.IsEmpty));
dispatcher.DidNotReceive().Dispatch(Arg.Any());
}
@@ -198,7 +198,7 @@ public async Task Migration_EndToEnd_EmptyDb_LegacyFavoritesAndGroups_PopulatesS
Assert.Equal(2, filterSet.Filters.Count);
Assert.Equal(LibraryEntryOrigin.UserSaved, filterSet.Origin);
- dispatcher.Received(1).Dispatch(Arg.Is(a => a.Entries.Count == 3));
+ dispatcher.Received(1).Dispatch(Arg.Is(a => a != null && a.Entries.Count == 3));
dispatcher.DidNotReceive().Dispatch(Arg.Any());
Assert.True(prefs.ContainsKey(FavoriteFiltersKey));
diff --git a/tests/Unit/EventLogExpert.Runtime.Tests/Alerts/AlertDialogServiceTests.cs b/tests/Unit/EventLogExpert.Runtime.Tests/Alerts/AlertDialogServiceTests.cs
index bf05ccffe..71ca4f6f5 100644
--- a/tests/Unit/EventLogExpert.Runtime.Tests/Alerts/AlertDialogServiceTests.cs
+++ b/tests/Unit/EventLogExpert.Runtime.Tests/Alerts/AlertDialogServiceTests.cs
@@ -40,7 +40,7 @@ public async Task DisplayPrompt_WhenActiveHost_ShouldRouteInlineAndReturnTypedVa
// Assert
Assert.Equal("typed-value", result);
await host.Received(1).ShowInlineAlertAsync(
- Arg.Is(r => r.IsPrompt && r.Title == "Rename" && r.Message == "Enter new name"),
+ Arg.Is(r => r != null && r.IsPrompt && r.Title == "Rename" && r.Message == "Enter new name"),
Arg.Any());
}
@@ -133,7 +133,7 @@ public async Task ShowAlert_ShouldMarshalThroughMainThreadService()
var mainThread = Substitute.For();
mainThread.InvokeOnMainThreadAsync(Arg.Any>())
- .Returns(call => ((Func)call[0])());
+ .Returns(call => call.ArgAt>(0)());
var sut = new AlertDialogService(
coordinator,
@@ -415,6 +415,7 @@ public async Task ShowAlertTwoButton_WhenActiveHost_ShouldRouteToHostInline()
Assert.False(standaloneCalled);
await host.Received(1).ShowInlineAlertAsync(
Arg.Is(r =>
+ r != null &&
r.Title == "Confirm" &&
r.Message == "Are you sure?" &&
r.AcceptLabel == "Yes" &&
diff --git a/tests/Unit/EventLogExpert.Runtime.Tests/Database/DatabaseOperationCoordinatorTests.cs b/tests/Unit/EventLogExpert.Runtime.Tests/Database/DatabaseOperationCoordinatorTests.cs
index 7cf44b830..c3ba5ba2b 100644
--- a/tests/Unit/EventLogExpert.Runtime.Tests/Database/DatabaseOperationCoordinatorTests.cs
+++ b/tests/Unit/EventLogExpert.Runtime.Tests/Database/DatabaseOperationCoordinatorTests.cs
@@ -65,8 +65,8 @@ public async Task ApplyPendingTogglesAsync_FiveFilesWithTwoFailures_AllAttempted
_databases.Received(1).Toggle("c.db");
_databases.Received(1).Toggle("d.db");
_databases.Received(1).Toggle("e.db");
- _errorBanners.Received(1).ReportError("Failed to Update Database", Arg.Is(m => m.Contains("c.db", StringComparison.Ordinal)));
- _errorBanners.Received(1).ReportError("Failed to Update Database", Arg.Is(m => m.Contains("e.db", StringComparison.Ordinal)));
+ _errorBanners.Received(1).ReportError("Failed to Update Database", Arg.Is(m => m != null && m.Contains("c.db", StringComparison.Ordinal)));
+ _errorBanners.Received(1).ReportError("Failed to Update Database", Arg.Is(m => m != null && m.Contains("e.db", StringComparison.Ordinal)));
_errorBanners.Received(2).ReportError("Failed to Update Database", Arg.Any());
}
@@ -136,7 +136,7 @@ public async Task ImportAsync_CallbackReturnsTrue_FileNotAddedToSkipSet()
await _databases.Received(1).ImportAsync(
Arg.Any>(),
- Arg.Is>(s => !s.Contains("exists.db")),
+ Arg.Is>(s => s != null && !s.Contains("exists.db")),
Arg.Any());
}
@@ -158,7 +158,7 @@ Task ThrowingCallback(string _, CancellationToken __) =>
// Conflict defaults to Skip because overwriting is riskier than importing nothing.
await _databases.Received(1).ImportAsync(
Arg.Any>(),
- Arg.Is>(s => s.Contains("exists.db")),
+ Arg.Is>(s => s != null && s.Contains("exists.db")),
Arg.Any());
_errorBanners.DidNotReceiveWithAnyArgs().ReportError(null!, null!);
}
@@ -175,7 +175,7 @@ public async Task ImportAsync_DatabaseServiceThrows_RoutesErrorBannerAndReturnsN
var sut = CreateSut();
var outcome = await sut.ImportAsync(cancellationToken: Ct);
- _errorBanners.Received(1).ReportError("Import Failed", Arg.Is(m => m.Contains("boom", StringComparison.Ordinal)));
+ _errorBanners.Received(1).ReportError("Import Failed", Arg.Is(m => m != null && m.Contains("boom", StringComparison.Ordinal)));
_infoBanners.DidNotReceiveWithAnyArgs().ReportInfoBanner(null!, null!, default);
Assert.Equal(ImportOutcome.None, outcome);
}
@@ -218,7 +218,7 @@ public async Task ImportAsync_LongRunningImport_PostOpRoutesDirectlyToInfoBanner
_infoBanners.Received(1).ReportInfoBanner(
"Import Successful",
- Arg.Is(m => m.Contains("1 database has successfully been imported", StringComparison.Ordinal)),
+ Arg.Is(m => m != null && m.Contains("1 database has successfully been imported", StringComparison.Ordinal)),
BannerSeverity.Info);
Assert.Equal(1, outcome.ImportedCount);
}
@@ -253,7 +253,7 @@ public async Task ImportAsync_NullCallbackWithExistingConflict_FileAddedToSkipSe
await _databases.Received(1).ImportAsync(
Arg.Any>(),
- Arg.Is>(s => s.Contains("exists.db")),
+ Arg.Is>(s => s != null && s.Contains("exists.db")),
Arg.Any());
}
@@ -306,7 +306,7 @@ public async Task ImportAsync_SameBasenameSourcesInOneBatch_AddsNameToSkipSet()
await _databases.Received(1).ImportAsync(
Arg.Any>(),
- Arg.Is>(skipFileNames => skipFileNames.Contains("A.db")),
+ Arg.Is>(skipFileNames => skipFileNames != null && skipFileNames.Contains("A.db")),
Arg.Any());
}
@@ -379,7 +379,7 @@ public async Task ImportAsync_ZeroImportedWithFailures_RoutesErrorBannerNotInfoB
var sut = CreateSut();
var outcome = await sut.ImportAsync(cancellationToken: Ct);
- _errorBanners.Received(1).ReportError("Import Failed", Arg.Is(m => m.Contains("A.db (bad)", StringComparison.Ordinal)));
+ _errorBanners.Received(1).ReportError("Import Failed", Arg.Is(m => m != null && m.Contains("A.db (bad)", StringComparison.Ordinal)));
_infoBanners.DidNotReceiveWithAnyArgs().ReportInfoBanner(null!, null!, default);
Assert.Equal(0, outcome.ImportedCount);
Assert.False(outcome.DatabaseStateChanged);
@@ -398,7 +398,7 @@ public async Task ImportPathsAsync_EnableOnImportFalse_ImportsGivenPathsWithoutP
Assert.Equal(1, outcome.ImportedCount);
await _filePicker.DidNotReceiveWithAnyArgs().PickMultipleAsync(null!, null!);
await _databases.Received(1).ImportAsync(
- Arg.Is>(paths => paths.SequenceEqual(new[] { @"C:\out\A.db" })),
+ Arg.Is>(paths => paths != null && paths.SequenceEqual(new[] { @"C:\out\A.db" })),
Arg.Any>(),
Arg.Any());
_databases.DidNotReceiveWithAnyArgs().Toggle(null!);
@@ -462,7 +462,7 @@ public async Task RemoveDatabaseAsync_DatabaseThrowsAfterSnapshotPopulated_Snaps
_logReload.Received(1).ReopenAfterDatabaseRemoval(Arg.Any>());
_errorBanners.Received(1).ReportError(
"Failed to Remove Database",
- Arg.Is(m => m.Contains("removal failed mid-flight", StringComparison.Ordinal)));
+ Arg.Is(m => m != null && m.Contains("removal failed mid-flight", StringComparison.Ordinal)));
}
[Fact]
@@ -601,7 +601,7 @@ public async Task RemoveDatabaseAsync_SuccessWithClosedLogs_ReopensLogsAndReport
Assert.True(outcome.Removed);
Assert.True(outcome.LogsReopened);
_logReload.Received(1).ReopenAfterDatabaseRemoval(
- Arg.Is>(l => l.Count == 1 && l[0].Name == "Application"));
+ Arg.Is>(l => l != null && l.Count == 1 && l[0].Name == "Application"));
_errorBanners.DidNotReceiveWithAnyArgs().ReportError(null!, null!);
}
@@ -644,7 +644,7 @@ public async Task UpgradeDatabaseAsync_DatabaseThrows_ReportsErrorBannerAndClear
Assert.Equal(2, stateChangeCount);
_errorBanners.Received(1).ReportError(
"Database Upgrade Failed",
- Arg.Is(m => m.Contains("upgrade body failed", StringComparison.Ordinal)));
+ Arg.Is(m => m != null && m.Contains("upgrade body failed", StringComparison.Ordinal)));
}
[Fact]
@@ -691,8 +691,8 @@ public async Task UpgradeDatabaseAsync_ResultFailedPopulated_ReportsOneErrorBann
var sut = CreateSut();
await sut.UpgradeDatabaseAsync("a.db", cancellationToken: Ct);
- _errorBanners.Received(1).ReportError("Database Upgrade Failed", Arg.Is(m => m.Contains("a.db", StringComparison.Ordinal) && m.Contains("schema-mismatch", StringComparison.Ordinal)));
- _errorBanners.Received(1).ReportError("Database Upgrade Failed", Arg.Is(m => m.Contains("b.db", StringComparison.Ordinal) && m.Contains("io-error", StringComparison.Ordinal)));
+ _errorBanners.Received(1).ReportError("Database Upgrade Failed", Arg.Is(m => m != null && m.Contains("a.db", StringComparison.Ordinal) && m.Contains("schema-mismatch", StringComparison.Ordinal)));
+ _errorBanners.Received(1).ReportError("Database Upgrade Failed", Arg.Is(m => m != null && m.Contains("b.db", StringComparison.Ordinal) && m.Contains("io-error", StringComparison.Ordinal)));
}
[Theory]
@@ -735,7 +735,7 @@ public async Task UpgradeDatabaseAsync_StateChangedSubscriberThrows_StateStillCl
Assert.False(sut.IsAnyUpgradeInFlight);
Assert.False(sut.IsUpgradeInFlight("a.db"));
await _databases.Received(1).UpgradeBatchAsync(
- Arg.Is>(l => l.Count == 1 && l[0] == "a.db"),
+ Arg.Is>(l => l != null && l.Count == 1 && l[0] == "a.db"),
Arg.Any(),
Arg.Any());
}
@@ -769,7 +769,7 @@ public async Task UpgradeDatabaseAsync_Success_TracksInFlightStateAndRaisesEnter
Assert.False(wasInFlightDuringExit, "Exit event should fire after file is removed");
Assert.False(sut.IsAnyUpgradeInFlight);
await _databases.Received(1).UpgradeBatchAsync(
- Arg.Is>(l => l.Count == 1 && l[0] == "a.db"),
+ Arg.Is>(l => l != null && l.Count == 1 && l[0] == "a.db"),
UpgradeProgressScope.ManageDatabasesTriggered,
Arg.Any());
}
@@ -842,8 +842,8 @@ public async Task UpgradeDatabasesAsync_PartialFailure_SurfacesEachFailureToErro
var actual = await sut.UpgradeDatabasesAsync(["a.db", "b.db", "c.db"], UpgradeProgressScope.ManageDatabasesTriggered, Ct);
Assert.Same(result, actual);
- _errorBanners.Received(1).ReportError("Database Upgrade Failed", Arg.Is(s => s.Contains("b.db") && s.Contains("schema mismatch")));
- _errorBanners.Received(1).ReportError("Database Upgrade Failed", Arg.Is(s => s.Contains("c.db") && s.Contains("io error")));
+ _errorBanners.Received(1).ReportError("Database Upgrade Failed", Arg.Is(s => s != null && s.Contains("b.db") && s.Contains("schema mismatch")));
+ _errorBanners.Received(1).ReportError("Database Upgrade Failed", Arg.Is(s => s != null && s.Contains("c.db") && s.Contains("io error")));
}
[Fact]
@@ -893,7 +893,7 @@ public async Task UpgradeDatabasesAsync_ServiceThrows_FallbackReturnedAndInFligh
Assert.NotNull(result);
Assert.Empty(result.Succeeded);
Assert.False(sut.IsAnyUpgradeInFlight);
- _errorBanners.Received(1).ReportError("Database Upgrade Failed", Arg.Is(s => s.Contains("disk full")));
+ _errorBanners.Received(1).ReportError("Database Upgrade Failed", Arg.Is(s => s != null && s.Contains("disk full")));
}
private static DatabaseEntry CreateEntry(
diff --git a/tests/Unit/EventLogExpert.Runtime.Tests/EventLog/DatabaseCoordinationEffectsReloadTests.cs b/tests/Unit/EventLogExpert.Runtime.Tests/EventLog/DatabaseCoordinationEffectsReloadTests.cs
index 9e47dce55..c94678724 100644
--- a/tests/Unit/EventLogExpert.Runtime.Tests/EventLog/DatabaseCoordinationEffectsReloadTests.cs
+++ b/tests/Unit/EventLogExpert.Runtime.Tests/EventLog/DatabaseCoordinationEffectsReloadTests.cs
@@ -71,7 +71,7 @@ public async Task PrepareForDatabaseRemovalAsync_CloseFailureMidwayDispatchesAll
using var cts = new CancellationTokenSource();
_dispatcher.When(d => d.Dispatch(Arg.Any())).Do(call =>
{
- var action = (CloseLogAction)call.Args()[0];
+ var action = call.ArgAt(0);
if (action.LogName == "Application")
{
@@ -103,7 +103,7 @@ public async Task ReloadAllActiveLogsAsync_CalledSequentiallyTwice_CoordinatorLo
_dispatcher.When(d => d.Dispatch(Arg.Any())).Do(call =>
{
- var action = (CloseLogAction)call.Args()[0];
+ var action = call.ArgAt(0);
_closeCoordinator.CompleteCloseFor(action.LogId);
});
@@ -165,7 +165,7 @@ public async Task ReloadAllActiveLogsAsync_CloseThrowsThenSubsequentCallProceeds
return;
}
- var action = (CloseLogAction)call.Args()[0];
+ var action = call.ArgAt(0);
_closeCoordinator.CompleteCloseFor(action.LogId);
});
@@ -203,15 +203,15 @@ public async Task ReloadAllActiveLogsAsync_TwoActiveLogs_DispatchesPerLogCloseAn
_dispatcher.When(d => d.Dispatch(Arg.Any())).Do(call =>
{
- var action = (CloseLogAction)call.Args()[0];
+ var action = call.ArgAt(0);
_closeCoordinator.CompleteCloseFor(action.LogId);
});
var sut = CreateSut();
await sut.ReloadAllActiveLogsAsync(Ct);
- _dispatcher.Received(1).Dispatch(Arg.Is(a => a.LogName == "Application"));
- _dispatcher.Received(1).Dispatch(Arg.Is(a => a.LogName == "C:/path/security.evtx"));
+ _dispatcher.Received(1).Dispatch(Arg.Is(a => a != null && a.LogName == "Application"));
+ _dispatcher.Received(1).Dispatch(Arg.Is(a => a != null && a.LogName == "C:/path/security.evtx"));
_dispatcher.DidNotReceive().Dispatch(Arg.Any());
_eventLogCommands.Received(1).OpenLog("Application", LogPathType.Channel, Arg.Any());
_eventLogCommands.Received(1).OpenLog("C:/path/security.evtx", LogPathType.File, Arg.Any());
diff --git a/tests/Unit/EventLogExpert.Runtime.Tests/EventLog/EffectsTests.cs b/tests/Unit/EventLogExpert.Runtime.Tests/EventLog/EffectsTests.cs
index 19aafb36e..905c8ffa0 100644
--- a/tests/Unit/EventLogExpert.Runtime.Tests/EventLog/EffectsTests.cs
+++ b/tests/Unit/EventLogExpert.Runtime.Tests/EventLog/EffectsTests.cs
@@ -48,7 +48,7 @@ public async Task HandleAddEvent_WhenBufferReachesMaxEvents_ShouldSetFullFlag()
// Assert
mockDispatcher.Received(1)
- .Dispatch(Arg.Is(a =>
+ .Dispatch(Arg.Is(a => a != null &&
a.IsFull == true && a.UpdatedBuffer.Count == EventLogState.MaxNewEvents));
}
@@ -71,7 +71,7 @@ public async Task HandleAddEvent_WhenContinuouslyUpdateFalse_ShouldBufferEvent()
// Assert
mockDispatcher.Received(1)
- .Dispatch(Arg.Is(a =>
+ .Dispatch(Arg.Is(a => a != null &&
a.UpdatedBuffer.Count == 1 && a.UpdatedBuffer[0] == newEvent));
}
@@ -118,7 +118,7 @@ public async Task HandleAddEvent_WhenContinuouslyUpdateTrue_AndEventFilteredOut_
await effects.HandleAddEvent(new AddEventAction(newEvent), mockDispatcher);
// Assert: raw is ingested unconditionally (Prepend) even though the filtered display append is skipped.
- mockDispatcher.Received(1).Dispatch(Arg.Is(a =>
+ mockDispatcher.Received(1).Dispatch(Arg.Is(a => a != null &&
a.Mode == RawIngestMode.Prepend && a.EventsByLog.ContainsKey(logData.Id)));
mockDispatcher.DidNotReceive().Dispatch(Arg.Any());
}
@@ -149,7 +149,7 @@ public async Task HandleAddEvent_WhenContinuouslyUpdateTrue_ShouldIngestRawAndAp
// post-ingest store is visible when HandleAddEvent rebuilds the display view over it.
mockDispatcher
.When(d => d.Dispatch(Arg.Any()))
- .Do(callInfo => rawState = RawEventStoreReducers.ReduceIngestRawEvents(rawState, callInfo.Arg()));
+ .Do(callInfo => rawState = RawEventStoreReducers.ReduceIngestRawEvents(rawState, callInfo.ArgAt(0)));
var newEvent = FilterEventBuilder.CreateTestEvent(100, logName: Constants.LogNameTestLog);
var action = new AddEventAction(newEvent);
@@ -158,11 +158,11 @@ public async Task HandleAddEvent_WhenContinuouslyUpdateTrue_ShouldIngestRawAndAp
await effects.HandleAddEvent(action, mockDispatcher);
// Assert
- mockDispatcher.Received(1).Dispatch(Arg.Is(a =>
+ mockDispatcher.Received(1).Dispatch(Arg.Is(a => a != null &&
a.Mode == RawIngestMode.Prepend && a.EventsByLog.ContainsKey(logData.Id)));
mockDispatcher.Received(1)
- .Dispatch(Arg.Is(a =>
+ .Dispatch(Arg.Is(a => a != null &&
a.LogId == logData.Id && a.View != null && a.View.Count == 1 && a.View.EnumerateDetail().First().Id == newEvent.Id));
mockDispatcher.DidNotReceive().Dispatch(Arg.Any());
@@ -198,9 +198,9 @@ public async Task HandleApplyFilter_FilterBranch_ShouldBracketDisplayedEventsUpd
Received.InOrder(() =>
{
- mockDispatcher.Dispatch(Arg.Is(a => a.IsLoading));
+ mockDispatcher.Dispatch(Arg.Is(a => a != null && a.IsLoading));
mockDispatcher.Dispatch(Arg.Any());
- mockDispatcher.Dispatch(Arg.Is(a => !a.IsLoading));
+ mockDispatcher.Dispatch(Arg.Is(a => a != null && !a.IsLoading));
});
}
@@ -244,8 +244,8 @@ public async Task HandleApplyFilter_FilterBranch_WhenFilterServiceThrows_ShouldS
await Assert.ThrowsAsync(() => effects.HandleApplyFilter(action, mockDispatcher));
- mockDispatcher.Received(1).Dispatch(Arg.Is(a => a.IsLoading));
- mockDispatcher.Received(1).Dispatch(Arg.Is(a => !a.IsLoading));
+ mockDispatcher.Received(1).Dispatch(Arg.Is(a => a != null && a.IsLoading));
+ mockDispatcher.Received(1).Dispatch(Arg.Is(a => a != null && !a.IsLoading));
mockDispatcher.DidNotReceive().Dispatch(Arg.Any());
}
@@ -287,7 +287,7 @@ public async Task HandleApplyFilter_FilterBranch_WhenFinalizeArrivesDuringOffThr
// The pass-1 snapshot saw only event 200 at ContentVersion 0; the post-build re-check saw the
// finalize rebuild at ContentVersion 1 and refiltered, so the published view reflects all three.
mockDispatcher.Received(1)
- .Dispatch(Arg.Is(a =>
+ .Dispatch(Arg.Is(a => a != null &&
a.Views.ContainsKey(snapshotData.Id) &&
a.Views[snapshotData.Id].Count == finalizedRaw.Count &&
a.Views[snapshotData.Id].EnumerateDetail().Any(e => e.Id == 202)));
@@ -330,7 +330,7 @@ public async Task HandleApplyFilter_FilterBranch_WhenLiveTailArrivesDuringOffThr
// The pass-1 snapshot saw only event 100 at ContentVersion 0; the post-build re-check saw the
// live-tail append at ContentVersion 1 and refiltered, so the published view includes event 101.
mockDispatcher.Received(1)
- .Dispatch(Arg.Is(a =>
+ .Dispatch(Arg.Is(a => a != null &&
a.Views.ContainsKey(snapshotData.Id) &&
a.Views[snapshotData.Id].Count == liveTailRaw.Count &&
a.Views[snapshotData.Id].EnumerateDetail().Any(e => e.Id == 101)));
@@ -373,7 +373,7 @@ public async Task HandleApplyFilter_FilterBranch_WhenLogClosedDuringFilter_Shoul
// Assert: the raw store dropped the log during the off-thread build (the post-snapshot reads
// return an empty store), so the post-build re-check finds it gone and DisplayReady omits its slice.
mockDispatcher.Received(1)
- .Dispatch(Arg.Is(a => !a.Views.ContainsKey(snapshotData.Id)));
+ .Dispatch(Arg.Is(a => a != null && !a.Views.ContainsKey(snapshotData.Id)));
}
[Fact]
@@ -427,7 +427,7 @@ public async Task HandleApplyFilter_FilterBranch_WhenLogEventsChangeDuringFilter
// the live-tail rebuild at ContentVersion 1 and refiltered from current state, so the published view
// reflects the updated row set (event 101), not the stale pass-1 rows.
mockDispatcher.Received(1)
- .Dispatch(Arg.Is(a =>
+ .Dispatch(Arg.Is(a => a != null &&
a.Views.ContainsKey(snapshotData.Id) &&
a.Views[snapshotData.Id].Count == liveTailRaw.Count &&
a.Views[snapshotData.Id].EnumerateDetail().Any(e => e.Id == 101)));
@@ -487,12 +487,12 @@ public async Task HandleApplyFilter_FilterBranch_WhenLogStillStaleAfterRetry_Sho
// so the slice is still stale and omitted, and a convergence pass is scheduled while the progress
// spinner stays on (cleared later by the converging pass).
mockDispatcher.Received(1)
- .Dispatch(Arg.Is(a => !a.Views.ContainsKey(snapshotData.Id)));
+ .Dispatch(Arg.Is(a => a != null && !a.Views.ContainsKey(snapshotData.Id)));
mockDispatcher.Received(1)
- .Dispatch(Arg.Is(a => a.StaleIds.Contains(snapshotData.Id)));
+ .Dispatch(Arg.Is(a => a != null && a.StaleIds.Contains(snapshotData.Id)));
- mockDispatcher.DidNotReceive().Dispatch(Arg.Is(a => !a.IsLoading));
+ mockDispatcher.DidNotReceive().Dispatch(Arg.Is(a => a != null && !a.IsLoading));
}
[Fact]
@@ -524,7 +524,7 @@ public async Task HandleApplyFilter_FilterBranch_WhenSupersededByNewerFilter_Sho
var superseded = 0;
mockDispatcher
- .When(d => d.Dispatch(Arg.Is(a => a.IsLoading)))
+ .When(d => d.Dispatch(Arg.Is(a => a != null && a.IsLoading)))
.Do(_ =>
{
if (Interlocked.Exchange(ref superseded, 1) == 0)
@@ -542,10 +542,10 @@ public async Task HandleApplyFilter_FilterBranch_WhenSupersededByNewerFilter_Sho
await effects.HandleApplyFilter(new ApplyFilterAction(new Filter(null, [])), mockDispatcher);
mockDispatcher.Received(1)
- .Dispatch(Arg.Is(a => a.Views[logData.Id].EnumerateDetail().Any(e => e.Id == 100)));
+ .Dispatch(Arg.Is(a => a != null && a.Views[logData.Id].EnumerateDetail().Any(e => e.Id == 100)));
// The stale run's finally was suppressed by the token guard, so only the fresh run cleared the spinner.
- mockDispatcher.Received(1).Dispatch(Arg.Is(a => !a.IsLoading));
+ mockDispatcher.Received(1).Dispatch(Arg.Is(a => a != null && !a.IsLoading));
}
[Fact]
@@ -569,7 +569,7 @@ public async Task HandleApplyFilter_ReloadBranch_ShouldClearStaleFilterProgressS
.When(d => d.Dispatch(Arg.Any()))
.Do(callInfo =>
{
- closeTasks.Add(effects.HandleCloseLog(callInfo.Arg(), mockDispatcher));
+ closeTasks.Add(effects.HandleCloseLog(callInfo.ArgAt(0), mockDispatcher));
});
var xmlFilter = FilterBuilder.CreateTestFilter(FilterTestConstants.FilterXmlContainsData, isEnabled: true);
@@ -578,8 +578,8 @@ public async Task HandleApplyFilter_ReloadBranch_ShouldClearStaleFilterProgressS
await effects.HandleApplyFilter(action, mockDispatcher);
Assert.True(action.Filter.RequiresXml);
- mockDispatcher.Received(1).Dispatch(Arg.Is(a => !a.IsLoading));
- mockDispatcher.DidNotReceive().Dispatch(Arg.Is(a => a.IsLoading));
+ mockDispatcher.Received(1).Dispatch(Arg.Is(a => a != null && !a.IsLoading));
+ mockDispatcher.DidNotReceive().Dispatch(Arg.Is(a => a != null && a.IsLoading));
// Surface any HandleCloseLog faults before exiting the test.
await Task.WhenAll(closeTasks);
@@ -637,7 +637,7 @@ public async Task HandleApplyFilter_WhenCloseAllArrivesMidReopenLoop_ShouldDispa
.When(d => d.Dispatch(Arg.Any()))
.Do(callInfo =>
{
- closeTasks.Add(effects.HandleCloseLog(callInfo.Arg(), mockDispatcher));
+ closeTasks.Add(effects.HandleCloseLog(callInfo.ArgAt(0), mockDispatcher));
});
// Hook the FIRST OpenLogAction dispatch to land CloseAll synchronously, which bumps
@@ -671,7 +671,7 @@ public async Task HandleApplyFilter_WhenCloseAllArrivesMidReopenLoop_ShouldDispa
mockDispatcher.Received(1).Dispatch(Arg.Any());
// The cleanup CloseLog targets the log we already reopened (Log1).
- mockDispatcher.Received().Dispatch(Arg.Is(a => a.LogName == Constants.LogNameLog1));
+ mockDispatcher.Received().Dispatch(Arg.Is(a => a != null && a.LogName == Constants.LogNameLog1));
// Surface any HandleCloseLog faults before exiting the test.
await Task.WhenAll(closeTasks);
@@ -734,7 +734,7 @@ public async Task HandleApplyFilter_WhenCloseAllSupersedesReload_ShouldClearPend
.When(d => d.Dispatch(Arg.Any()))
.Do(callInfo =>
{
- closeTasks.Add(effects.HandleCloseLog(callInfo.Arg(), mockDispatcher));
+ closeTasks.Add(effects.HandleCloseLog(callInfo.ArgAt(0), mockDispatcher));
});
var xmlFilter = FilterBuilder.CreateTestFilter(FilterTestConstants.FilterXmlContainsData, isEnabled: true);
@@ -789,7 +789,7 @@ public async Task HandleApplyFilter_WhenCloseAllSupersedesReload_ShouldNotReopen
.When(d => d.Dispatch(Arg.Any()))
.Do(callInfo =>
{
- closeTasks.Add(effects.HandleCloseLog(callInfo.Arg(), mockDispatcher));
+ closeTasks.Add(effects.HandleCloseLog(callInfo.ArgAt(0), mockDispatcher));
});
var xmlFilter = FilterBuilder.CreateTestFilter(FilterTestConstants.FilterXmlContainsData, isEnabled: true);
@@ -869,7 +869,7 @@ public async Task HandleApplyFilter_WhenFilterRequiresXml_AwaitsCloseCompletionB
.When(d => d.Dispatch(Arg.Any()))
.Do(callInfo =>
{
- closeTasks.Add(effects.HandleCloseLog(callInfo.Arg(), mockDispatcher));
+ closeTasks.Add(effects.HandleCloseLog(callInfo.ArgAt(0), mockDispatcher));
});
var xmlFilter = FilterBuilder.CreateTestFilter(FilterTestConstants.FilterXmlContainsData, isEnabled: true);
@@ -891,7 +891,7 @@ public async Task HandleApplyFilter_WhenFilterRequiresXml_AwaitsCloseCompletionB
// OpenLog should now have been dispatched (only happens after the close await).
mockDispatcher.Received(1)
- .Dispatch(Arg.Is(a =>
+ .Dispatch(Arg.Is(a => a != null &&
a.LogName == Constants.LogNameTestLog && a.LogPathType == LogPathType.Channel));
// Surface any HandleCloseLog faults before exiting the test.
@@ -936,7 +936,7 @@ public async Task HandleApplyFilter_WhenFilterRequiresXml_ShouldRestoreSelection
var mockFilterService = Substitute.For();
mockFilterService.GetFilteredEvents(Arg.Any>(), Arg.Any())
- .Returns(callInfo => callInfo.Arg>().ToList());
+ .Returns(callInfo => callInfo.ArgAt>(0).ToList());
var mockServiceScopeFactory = Substitute.For();
var mockServiceScope = Substitute.For();
@@ -972,7 +972,7 @@ public async Task HandleApplyFilter_WhenFilterRequiresXml_ShouldRestoreSelection
.When(d => d.Dispatch(Arg.Any()))
.Do(callInfo =>
{
- closeTasks.Add(effects.HandleCloseLog(callInfo.Arg(), mockDispatcher));
+ closeTasks.Add(effects.HandleCloseLog(callInfo.ArgAt(0), mockDispatcher));
});
var xmlFilter = FilterBuilder.CreateTestFilter(FilterTestConstants.FilterXmlContainsData, isEnabled: true);
@@ -987,7 +987,7 @@ public async Task HandleApplyFilter_WhenFilterRequiresXml_ShouldRestoreSelection
// Assert: SetSelectedEvents dispatched with exactly the restored event (RecordId=42).
mockDispatcher.Received(1)
- .Dispatch(Arg.Is(a =>
+ .Dispatch(Arg.Is(a => a != null &&
a.Selection.Count() == 1 && a.Selection.First().ReloadKey!.Value.RecordId == 42));
// Surface any HandleCloseLog faults before exiting the test.
@@ -1013,7 +1013,7 @@ public async Task HandleApplyFilter_WhenFilterRequiresXmlAndLogLacksXml_ShouldCl
.When(d => d.Dispatch(Arg.Any()))
.Do(callInfo =>
{
- closeTasks.Add(effects.HandleCloseLog(callInfo.Arg(), mockDispatcher));
+ closeTasks.Add(effects.HandleCloseLog(callInfo.ArgAt(0), mockDispatcher));
});
var xmlFilter = FilterBuilder.CreateTestFilter(FilterTestConstants.FilterXmlContainsData, isEnabled: true);
@@ -1027,11 +1027,11 @@ public async Task HandleApplyFilter_WhenFilterRequiresXmlAndLogLacksXml_ShouldCl
Assert.True(filter.RequiresXml);
mockDispatcher.Received(1)
- .Dispatch(Arg.Is(a =>
+ .Dispatch(Arg.Is(a => a != null &&
a.LogName == Constants.LogNameTestLog && a.LogId == logData.Id));
mockDispatcher.Received(1)
- .Dispatch(Arg.Is(a =>
+ .Dispatch(Arg.Is(a => a != null &&
a.LogName == Constants.LogNameTestLog && a.LogPathType == LogPathType.Channel));
// Reload path returns early; no DisplayReady until LoadEvents fires.
@@ -1065,7 +1065,7 @@ public async Task HandleApplyFilter_WhenNewerApplyFilterRacesReload_ShouldStillR
.When(d => d.Dispatch(Arg.Any()))
.Do(callInfo =>
{
- closeTasks.Add(effects.HandleCloseLog(callInfo.Arg(), mockDispatcher));
+ closeTasks.Add(effects.HandleCloseLog(callInfo.ArgAt(0), mockDispatcher));
});
var xmlFilter1 = FilterBuilder.CreateTestFilter(FilterTestConstants.FilterXmlContainsData, isEnabled: true);
@@ -1094,7 +1094,7 @@ public async Task HandleApplyFilter_WhenNewerApplyFilterRacesReload_ShouldStillR
// would not have happened if the round-2 guard had treated filter2's filter token
// bump as supersession).
mockDispatcher.Received(1)
- .Dispatch(Arg.Is(a =>
+ .Dispatch(Arg.Is(a => a != null &&
a.LogName == Constants.LogNameTestLog && a.LogPathType == LogPathType.Channel));
// Surface any HandleCloseLog faults before exiting the test.
@@ -1137,7 +1137,7 @@ public async Task HandleApplyFilter_WhenReloadSupersedesFilterOnly_ShouldDropFil
var superseded = 0;
mockDispatcher
- .When(d => d.Dispatch(Arg.Is(a => a.IsLoading)))
+ .When(d => d.Dispatch(Arg.Is(a => a != null && a.IsLoading)))
.Do(_ =>
{
if (Interlocked.Exchange(ref superseded, 1) == 0)
@@ -1153,7 +1153,7 @@ public async Task HandleApplyFilter_WhenReloadSupersedesFilterOnly_ShouldDropFil
// The stale filter-only run must NOT have dispatched its DisplayReady for id 999.
mockDispatcher.DidNotReceive()
- .Dispatch(Arg.Is(a =>
+ .Dispatch(Arg.Is(a => a != null &&
a.Views.ContainsKey(logData.Id) && a.Views[logData.Id].EnumerateDetail().Any(e => e.Id == 999)));
}
@@ -1321,7 +1321,7 @@ public async Task HandleCloseLog_ShouldRemoveLogAndDispatchCloseAction()
await mockLogWatcher.Received(1).RemoveLogAsync(Constants.LogNameTestLog);
mockDispatcher.Received(1)
- .Dispatch(Arg.Is(a =>
+ .Dispatch(Arg.Is(a => a != null &&
a.LogId == logId));
}
@@ -1396,9 +1396,9 @@ await effects.HandleConvergeFilter(
// Assert: converged slice published, progress cleared, no further convergence scheduled.
mockDispatcher.Received(1)
- .Dispatch(Arg.Is(a => a.Views.ContainsKey(logData.Id)));
+ .Dispatch(Arg.Is(a => a != null && a.Views.ContainsKey(logData.Id)));
- mockDispatcher.Received(1).Dispatch(Arg.Is(a => !a.IsLoading));
+ mockDispatcher.Received(1).Dispatch(Arg.Is(a => a != null && !a.IsLoading));
mockDispatcher.DidNotReceive().Dispatch(Arg.Any());
}
@@ -1488,7 +1488,7 @@ await effects.HandleConvergeFilter(
mockDispatcher.DidNotReceive().Dispatch(Arg.Any());
mockDispatcher.DidNotReceive().Dispatch(Arg.Any());
- mockDispatcher.Received(1).Dispatch(Arg.Is(a => !a.IsLoading));
+ mockDispatcher.Received(1).Dispatch(Arg.Is(a => a != null && !a.IsLoading));
}
[Fact]
@@ -1531,7 +1531,7 @@ public async Task HandleLoadEvents_ShouldFilterAndDispatchUpdateTable()
await effects.HandleLoadEvents(action, mockDispatcher);
// Assert: a pre-built display view for the finalized log is handed to the reducer.
- mockDispatcher.Received(1).Dispatch(Arg.Is(a =>
+ mockDispatcher.Received(1).Dispatch(Arg.Is(a => a != null &&
a.LogId == logData.Id && a.View != null && a.View.Count == 2));
}
@@ -1548,7 +1548,7 @@ public async Task HandleLoadNewEvents_ShouldIngestRawPrependFromBuffer()
await effects.HandleLoadNewEvents(mockDispatcher);
- mockDispatcher.Received(1).Dispatch(Arg.Is(a =>
+ mockDispatcher.Received(1).Dispatch(Arg.Is(a => a != null &&
a.Mode == RawIngestMode.Prepend && a.EventsByLog.ContainsKey(logData.Id)));
}
@@ -1584,14 +1584,14 @@ public async Task HandleLoadNewEvents_ShouldProcessBufferAndDispatchActions()
// visible in the store when the batch view is built.
mockDispatcher
.When(d => d.Dispatch(Arg.Any()))
- .Do(callInfo => rawState = RawEventStoreReducers.ReduceIngestRawEvents(rawState, callInfo.Arg()));
+ .Do(callInfo => rawState = RawEventStoreReducers.ReduceIngestRawEvents(rawState, callInfo.ArgAt(0)));
// Act
await effects.HandleLoadNewEvents(mockDispatcher);
// Assert
mockDispatcher.Received(1)
- .Dispatch(Arg.Is(a =>
+ .Dispatch(Arg.Is(a => a != null &&
a.ViewsByLog.Count == 1 &&
a.ViewsByLog.ContainsKey(logData.Id) &&
a.ViewsByLog[logData.Id].Count == 2));
@@ -1599,7 +1599,7 @@ public async Task HandleLoadNewEvents_ShouldProcessBufferAndDispatchActions()
mockDispatcher.DidNotReceive().Dispatch(Arg.Any());
mockDispatcher.Received(1)
- .Dispatch(Arg.Is(a =>
+ .Dispatch(Arg.Is(a => a != null &&
a.UpdatedBuffer.Count == 0 && a.IsFull == false));
}
@@ -1628,7 +1628,7 @@ public async Task HandleLoadNewEvents_WhenAllEventsFiltered_ShouldNotDispatchApp
mockDispatcher.DidNotReceive().Dispatch(Arg.Any());
mockDispatcher.Received(1)
- .Dispatch(Arg.Is(a =>
+ .Dispatch(Arg.Is(a => a != null &&
a.UpdatedBuffer.Count == 0 && a.IsFull == false));
}
@@ -1670,13 +1670,13 @@ public async Task HandleLoadNewEvents_WhenBufferSpansMultipleLogs_ShouldGroupInt
// single batch view is built.
mockDispatcher
.When(d => d.Dispatch(Arg.Any()))
- .Do(callInfo => rawState = RawEventStoreReducers.ReduceIngestRawEvents(rawState, callInfo.Arg()));
+ .Do(callInfo => rawState = RawEventStoreReducers.ReduceIngestRawEvents(rawState, callInfo.ArgAt(0)));
AppendTableEventsBatchAction? captured = null;
mockDispatcher
.When(dispatcher => dispatcher.Dispatch(Arg.Any()))
- .Do(call => captured = (AppendTableEventsBatchAction)call.Args()[0]);
+ .Do(call => captured = call.ArgAt(0));
// Act
await effects.HandleLoadNewEvents(mockDispatcher);
@@ -2028,7 +2028,7 @@ public async Task HandleOpenLog_ReverseEagerLoad_WhenReaderInvalid_SurfacesLoadF
await openLog.HandleOpenLog(new OpenLogAction(Constants.LogNameApplication, LogPathType.Channel), dispatcher);
// A log that fails to open surfaces an error instead of a misleading empty final load, and never seeds the watcher.
- dispatcher.Received().Dispatch(Arg.Is(a =>
+ dispatcher.Received().Dispatch(Arg.Is(a => a != null &&
a.ResolverStatus.Contains("Error") && a.ResolverStatus.Contains(Constants.LogNameApplication)));
Assert.Empty(dispatcher.ReceivedCalls().Select(call => call.GetArguments()[0]).OfType());
watcher.DidNotReceive().AddLog(Arg.Any(), Arg.Any(), Arg.Any());
@@ -2049,7 +2049,7 @@ public async Task HandleOpenLog_ReverseEagerLoad_WhenReadStopsOnError_SurfacesLo
await openLog.HandleOpenLog(new OpenLogAction(Constants.LogNameApplication, LogPathType.Channel), dispatcher);
// A read that stops on a Win32 error is surfaced as a failure, not dispatched as a successful final load.
- dispatcher.Received().Dispatch(Arg.Is(a =>
+ dispatcher.Received().Dispatch(Arg.Is(a => a != null &&
a.ResolverStatus.Contains("Error") && a.ResolverStatus.Contains(Constants.LogNameApplication)));
Assert.Empty(dispatcher.ReceivedCalls().Select(call => call.GetArguments()[0]).OfType());
}
@@ -2071,8 +2071,8 @@ public async Task HandleOpenLog_ShouldThreadOpenLogsIdIntoDispatchedAddTableActi
await effects.HandleOpenLog(action, mockDispatcher);
- mockDispatcher.Received(1).Dispatch(Arg.Is(a => a.LogData.Id == logData.Id));
- mockDispatcher.Received().Dispatch(Arg.Is(a => a.LogId == logData.Id));
+ mockDispatcher.Received(1).Dispatch(Arg.Is(a => a != null && a.LogData.Id == logData.Id));
+ mockDispatcher.Received().Dispatch(Arg.Is(a => a != null && a.LogId == logData.Id));
}
[Fact]
@@ -2111,7 +2111,7 @@ public async Task HandleOpenLog_WhenLogNotInOpenLogs_ShouldDispatchError()
// Assert
mockDispatcher.Received(1)
- .Dispatch(Arg.Is(a =>
+ .Dispatch(Arg.Is(a => a != null &&
a.ResolverStatus.Contains("Error") && a.ResolverStatus.Contains(Constants.LogNameTestLog)));
}
@@ -2133,7 +2133,7 @@ public async Task HandleOpenLog_WhenNoEventResolver_ShouldDispatchError()
// Assert
mockDispatcher.Received(1)
- .Dispatch(Arg.Is(a =>
+ .Dispatch(Arg.Is(a => a != null &&
a.ResolverStatus.Contains("Error")));
}
@@ -2219,7 +2219,7 @@ public async Task HandleSetOrderBy_SortEffect_ShouldRepublishUnderRequestedConte
await effects.Filtering.HandleSetOrderBy(new SetOrderByAction(ColumnName.Source), mockDispatcher);
- mockDispatcher.Received(1).Dispatch(Arg.Is(a =>
+ mockDispatcher.Received(1).Dispatch(Arg.Is(a => a != null &&
a.Version == 7 &&
a.Views.ContainsKey(logData.Id) &&
a.Views[logData.Id].HasContext(new SortContext(ColumnName.Source, true, null, false))));
@@ -2326,7 +2326,7 @@ public async Task HandleUpdateTable_WhenSortPending_RepublishesUnderRequestedCon
await effects.Filtering.HandleUpdateTable(mockDispatcher);
- mockDispatcher.Received(1).Dispatch(Arg.Is(a =>
+ mockDispatcher.Received(1).Dispatch(Arg.Is(a => a != null &&
a.Version == 7 &&
a.Views.ContainsKey(logData.Id) &&
a.Views[logData.Id].HasContext(new SortContext(ColumnName.Source, true, null, false))));
@@ -2370,7 +2370,7 @@ public async Task HandleUpdateTable_WhenSortPendingMultiLog_RepublishesEveryLogU
await effects.Filtering.HandleUpdateTable(mockDispatcher);
var requested = new SortContext(ColumnName.Source, true, null, false);
- mockDispatcher.Received(1).Dispatch(Arg.Is(a =>
+ mockDispatcher.Received(1).Dispatch(Arg.Is(a => a != null &&
a.Version == 3 &&
a.Views.ContainsKey(logA.Id) && a.Views[logA.Id].HasContext(requested) &&
a.Views.ContainsKey(logB.Id) && a.Views[logB.Id].HasContext(requested)));
@@ -2394,11 +2394,11 @@ public void ReopenAfterDatabaseRemoval_DispatchesOpenLogPerSnapshotEntry()
// Assert
mockDispatcher.Received(1)
- .Dispatch(Arg.Is(a =>
+ .Dispatch(Arg.Is(a => a != null &&
a.LogName == Constants.LogNameLog1 && a.LogPathType == LogPathType.Channel));
mockDispatcher.Received(1)
- .Dispatch(Arg.Is(a =>
+ .Dispatch(Arg.Is(a => a != null &&
a.LogName == Constants.LogNameLog2 && a.LogPathType == LogPathType.File));
}
@@ -2561,7 +2561,7 @@ private static (OpenLogEffects openLog, IDispatcher dispatcher, ILogWatcherServi
var resolver = Substitute.For();
resolver.ResolveEvent(Arg.Any()).Returns(callInfo =>
{
- var record = callInfo.Arg();
+ var record = callInfo.ArgAt(0);
if (resolveDelayMs is not null)
{
@@ -2639,7 +2639,7 @@ private static (EffectsHarness effects, IDispatcher mockDispatcher) CreateEffect
.Returns(new Dictionary>());
mockFilterService.GetFilteredEvents(Arg.Any>(), Arg.Any