Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions src/Wolfgang.Etl.TestKit/SnapshotTestLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ public async Task FullExtractor_progress_overloads_reject_null_progress()
var sut = new FullExtractor<int, string>(Items, "p");

await Assert.ThrowsAsync<ArgumentNullException>(
async () => await sut.ExtractAsync((IProgress<string>)null!).ToListAsync());
async () => await sut.ExtractAsync(null!).ToListAsync());

await Assert.ThrowsAsync<ArgumentNullException>(
async () => await sut.ExtractAsync((IProgress<string>)null!, CancellationToken.None).ToListAsync());
async () => await sut.ExtractAsync(null!, CancellationToken.None).ToListAsync());
}


Expand All @@ -50,7 +50,7 @@ public async Task ProgressOnlyExtractor_progress_overload_rejects_null_progress(
var sut = new ProgressOnlyExtractor<int, string>(Items, "p");

await Assert.ThrowsAsync<ArgumentNullException>(
async () => await sut.ExtractAsync((IProgress<string>)null!).ToListAsync());
async () => await sut.ExtractAsync(null!).ToListAsync());
}


Expand Down Expand Up @@ -78,10 +78,10 @@ public async Task FullLoader_progress_overloads_reject_null_progress()
var sut = new FullLoader<int, string>("p");

await Assert.ThrowsAsync<ArgumentNullException>(
async () => await sut.LoadAsync(Source(), (IProgress<string>)null!));
async () => await sut.LoadAsync(Source(), null!));

await Assert.ThrowsAsync<ArgumentNullException>(
async () => await sut.LoadAsync(Source(), (IProgress<string>)null!, CancellationToken.None));
async () => await sut.LoadAsync(Source(), null!, CancellationToken.None));
}


Expand All @@ -91,7 +91,7 @@ public async Task ProgressOnlyLoader_progress_overload_rejects_null_progress()
var sut = new ProgressOnlyLoader<int, string>("p");

await Assert.ThrowsAsync<ArgumentNullException>(
async () => await sut.LoadAsync(Source(), (IProgress<string>)null!));
async () => await sut.LoadAsync(Source(), null!));
}


Expand All @@ -118,10 +118,10 @@ public async Task FullTransformer_progress_overloads_reject_null_progress()
var sut = new FullTransformer<int, int, string>(x => x, "p");

await Assert.ThrowsAsync<ArgumentNullException>(
async () => await sut.TransformAsync(Source(), (IProgress<string>)null!).ToListAsync());
async () => await sut.TransformAsync(Source(), null!).ToListAsync());

await Assert.ThrowsAsync<ArgumentNullException>(
async () => await sut.TransformAsync(Source(), (IProgress<string>)null!, CancellationToken.None).ToListAsync());
async () => await sut.TransformAsync(Source(), null!, CancellationToken.None).ToListAsync());
}


Expand All @@ -131,6 +131,6 @@ public async Task ProgressOnlyTransformer_progress_overload_rejects_null_progres
var sut = new ProgressOnlyTransformer<int, int, string>(x => x, "p");

await Assert.ThrowsAsync<ArgumentNullException>(
async () => await sut.TransformAsync(Source(), (IProgress<string>)null!).ToListAsync());
async () => await sut.TransformAsync(Source(), null!).ToListAsync());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -197,7 +197,7 @@ public ExposedTimerExtractor(Func<int> factory, int count, IProgressTimer timer)
public ExposedTimerExtractor(Func<int, int> factory, int count, IProgressTimer timer)
: base(factory, count, timer) { }

public IProgressTimer CallCreateProgressTimer(IProgress<Report> progress) =>
public void CallCreateProgressTimer(IProgress<Report> progress) =>
CreateProgressTimer(progress);

public void CallDispose(bool disposing) => Dispose(disposing);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Loading