diff --git a/src/Wolfgang.Etl.TestKit/SnapshotTestLoader.cs b/src/Wolfgang.Etl.TestKit/SnapshotTestLoader.cs index 55ab8f9b..2804b70a 100644 --- a/src/Wolfgang.Etl.TestKit/SnapshotTestLoader.cs +++ b/src/Wolfgang.Etl.TestKit/SnapshotTestLoader.cs @@ -140,9 +140,9 @@ CancellationToken token _buffer.Clear(); - // Stryker disable once Boolean : ConfigureAwait(false) is required on net462/netstandard2.0; - // (true) is behaviourally identical under the test host (no synchronization context), so the - // mutant is equivalent and unkillable. + // Stryker disable once Boolean : the false argument to ConfigureAwait is required on net462 + // and netstandard2.0, and passing true instead is behaviourally identical under the test host + // with no synchronization context, so the mutant is equivalent and unkillable. await foreach (var item in items.WithCancellation(token).ConfigureAwait(false)) { token.ThrowIfCancellationRequested(); diff --git a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/PipelineTests/OverloadDoubleCoverageTests.cs b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/PipelineTests/OverloadDoubleCoverageTests.cs index 2b494a22..4d763124 100644 --- a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/PipelineTests/OverloadDoubleCoverageTests.cs +++ b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/PipelineTests/OverloadDoubleCoverageTests.cs @@ -37,10 +37,10 @@ public async Task FullExtractor_progress_overloads_reject_null_progress() var sut = new FullExtractor(Items, "p"); await Assert.ThrowsAsync( - async () => await sut.ExtractAsync((IProgress)null!).ToListAsync()); + async () => await sut.ExtractAsync(null!).ToListAsync()); await Assert.ThrowsAsync( - async () => await sut.ExtractAsync((IProgress)null!, CancellationToken.None).ToListAsync()); + async () => await sut.ExtractAsync(null!, CancellationToken.None).ToListAsync()); } @@ -50,7 +50,7 @@ public async Task ProgressOnlyExtractor_progress_overload_rejects_null_progress( var sut = new ProgressOnlyExtractor(Items, "p"); await Assert.ThrowsAsync( - async () => await sut.ExtractAsync((IProgress)null!).ToListAsync()); + async () => await sut.ExtractAsync(null!).ToListAsync()); } @@ -78,10 +78,10 @@ public async Task FullLoader_progress_overloads_reject_null_progress() var sut = new FullLoader("p"); await Assert.ThrowsAsync( - async () => await sut.LoadAsync(Source(), (IProgress)null!)); + async () => await sut.LoadAsync(Source(), null!)); await Assert.ThrowsAsync( - async () => await sut.LoadAsync(Source(), (IProgress)null!, CancellationToken.None)); + async () => await sut.LoadAsync(Source(), null!, CancellationToken.None)); } @@ -91,7 +91,7 @@ public async Task ProgressOnlyLoader_progress_overload_rejects_null_progress() var sut = new ProgressOnlyLoader("p"); await Assert.ThrowsAsync( - async () => await sut.LoadAsync(Source(), (IProgress)null!)); + async () => await sut.LoadAsync(Source(), null!)); } @@ -118,10 +118,10 @@ public async Task FullTransformer_progress_overloads_reject_null_progress() var sut = new FullTransformer(x => x, "p"); await Assert.ThrowsAsync( - async () => await sut.TransformAsync(Source(), (IProgress)null!).ToListAsync()); + async () => await sut.TransformAsync(Source(), null!).ToListAsync()); await Assert.ThrowsAsync( - async () => await sut.TransformAsync(Source(), (IProgress)null!, CancellationToken.None).ToListAsync()); + async () => await sut.TransformAsync(Source(), null!, CancellationToken.None).ToListAsync()); } @@ -131,6 +131,6 @@ public async Task ProgressOnlyTransformer_progress_overload_rejects_null_progres var sut = new ProgressOnlyTransformer(x => x, "p"); await Assert.ThrowsAsync( - async () => await sut.TransformAsync(Source(), (IProgress)null!).ToListAsync()); + async () => await sut.TransformAsync(Source(), null!).ToListAsync()); } } diff --git a/tests/Wolfgang.Etl.TestKit.Tests.Unit/DelayingExtractorTests.cs b/tests/Wolfgang.Etl.TestKit.Tests.Unit/DelayingExtractorTests.cs index 07fc409d..086f2f13 100644 --- a/tests/Wolfgang.Etl.TestKit.Tests.Unit/DelayingExtractorTests.cs +++ b/tests/Wolfgang.Etl.TestKit.Tests.Unit/DelayingExtractorTests.cs @@ -201,7 +201,7 @@ public async Task ExtractAsync_advances_the_delay_index_across_skipped_items() { } - // Items 0 and 1 are skipped (the selector is only consulted for yielded items); + // Items 0 and 1 are skipped — the selector is only consulted for yielded items. // the two yielded items are queried at their real indices 2 and 3. Assert.Equal(new[] { 2, 3 }, seen); } @@ -255,7 +255,7 @@ public async Task ExtractAsync_cancelling_during_skip_stops_at_the_in_loop_check { // With a large SkipItemCount, the per-item ThrowIfCancellationRequested is the ONLY // cancellation check reached while skipping — the Task.Delay (which also observes the token) - // runs only for non-skipped items. The source cancels the token as its 6th item is pulled; + // runs only for non-skipped items. The source cancels the token as its 6th item is pulled, // the in-loop check must throw right then, having skipped only a handful of items. Without // that check, skipping would race ahead to the full SkipItemCount before the delay finally // noticed cancellation — so a small skipped count proves the in-loop check fired. diff --git a/tests/Wolfgang.Etl.TestKit.Tests.Unit/TestExtractorMutationTests.cs b/tests/Wolfgang.Etl.TestKit.Tests.Unit/TestExtractorMutationTests.cs index 2fec5856..8b973148 100644 --- a/tests/Wolfgang.Etl.TestKit.Tests.Unit/TestExtractorMutationTests.cs +++ b/tests/Wolfgang.Etl.TestKit.Tests.Unit/TestExtractorMutationTests.cs @@ -104,7 +104,7 @@ public void CreateProgressTimer_called_twice_wires_Elapsed_only_once() [Fact] public void Dispose_when_not_disposing_leaves_the_Elapsed_subscription_intact() { - // L505: `disposing && _progressTimer is not null && _elapsedHandler is not null` (both &&). + // L505: the Dispose guard requires disposing plus progressTimer-not-null plus elapsedHandler-not-null, all three together. // On the finalizer path (disposing == false) the original leaves the caller-owned timer // untouched, so a subsequent Fire() still reports. Either `&&`->`||` mutant would // unsubscribe here, producing zero reports. @@ -197,7 +197,7 @@ public ExposedTimerExtractor(Func factory, int count, IProgressTimer timer) public ExposedTimerExtractor(Func factory, int count, IProgressTimer timer) : base(factory, count, timer) { } - public IProgressTimer CallCreateProgressTimer(IProgress progress) => + public void CallCreateProgressTimer(IProgress progress) => CreateProgressTimer(progress); public void CallDispose(bool disposing) => Dispose(disposing); diff --git a/tests/Wolfgang.Etl.TestKit.Tests.Unit/TestTransformerMutationTests.cs b/tests/Wolfgang.Etl.TestKit.Tests.Unit/TestTransformerMutationTests.cs index fc94c64c..0d0eb252 100644 --- a/tests/Wolfgang.Etl.TestKit.Tests.Unit/TestTransformerMutationTests.cs +++ b/tests/Wolfgang.Etl.TestKit.Tests.Unit/TestTransformerMutationTests.cs @@ -61,7 +61,7 @@ public void CreateProgressTimer_called_twice_wires_Elapsed_only_once() [Fact] public void Dispose_when_not_disposing_leaves_the_Elapsed_subscription_intact() { - // L113: `disposing && _progressTimer is not null && _elapsedHandler is not null` (both &&). + // L113: the Dispose guard requires disposing plus progressTimer-not-null plus elapsedHandler-not-null, all three together. // On the finalizer path (disposing == false) the original must not touch the caller-owned // timer, so a subsequent Fire() still reports. Either `&&`->`||` mutant unsubscribes here. using var timer = new ManualProgressTimer();