diff --git a/src/Wolfgang.Etl.TestKit.Xunit/EtlScenarioOfT.cs b/src/Wolfgang.Etl.TestKit.Xunit/EtlScenarioOfT.cs index 3cc99add..5aa968cb 100644 --- a/src/Wolfgang.Etl.TestKit.Xunit/EtlScenarioOfT.cs +++ b/src/Wolfgang.Etl.TestKit.Xunit/EtlScenarioOfT.cs @@ -23,8 +23,8 @@ public sealed class EtlScenario where T : notnull { private readonly T[] _items; - private (int Index, System.Exception Exception, bool Skip)? _extractorFault; - private (int Index, System.Exception Exception, bool Skip)? _loaderFault; + private (int Index, Exception Exception, bool Skip)? _extractorFault; + private (int Index, Exception Exception, bool Skip)? _loaderFault; private TransformerBase? _transformer; diff --git a/src/Wolfgang.Etl.TestKit.Xunit/ExtractWithProgressAndCancellationAsyncContractTests.cs b/src/Wolfgang.Etl.TestKit.Xunit/ExtractWithProgressAndCancellationAsyncContractTests.cs index ee5fa11e..0a96b172 100644 --- a/src/Wolfgang.Etl.TestKit.Xunit/ExtractWithProgressAndCancellationAsyncContractTests.cs +++ b/src/Wolfgang.Etl.TestKit.Xunit/ExtractWithProgressAndCancellationAsyncContractTests.cs @@ -204,7 +204,7 @@ public void ExtractAsync_with_null_progress_throws_ArgumentNullException() var ex = Assert.Throws(() => { - _ = sut.ExtractAsync((IProgress)null!); + _ = sut.ExtractAsync(null!); }); Assert.Equal("progress", ex.ParamName); @@ -282,7 +282,7 @@ public void ExtractAsync_with_null_progress_and_token_throws_ArgumentNullExcepti var ex = Assert.Throws(() => { - _ = sut.ExtractAsync((IProgress)null!, CancellationToken.None); + _ = sut.ExtractAsync(null!, CancellationToken.None); }); Assert.Equal("progress", ex.ParamName); diff --git a/src/Wolfgang.Etl.TestKit.Xunit/ExtractWithProgressAsyncContractTests.cs b/src/Wolfgang.Etl.TestKit.Xunit/ExtractWithProgressAsyncContractTests.cs index 98951a62..763e4c87 100644 --- a/src/Wolfgang.Etl.TestKit.Xunit/ExtractWithProgressAsyncContractTests.cs +++ b/src/Wolfgang.Etl.TestKit.Xunit/ExtractWithProgressAsyncContractTests.cs @@ -91,7 +91,7 @@ public void ExtractAsync_with_null_progress_throws_ArgumentNullException() var ex = Assert.Throws(() => { // The exception is thrown when the method is called, before enumeration starts. - _ = sut.ExtractAsync((IProgress)null!); + _ = sut.ExtractAsync(null!); }); Assert.Equal("progress", ex.ParamName); diff --git a/src/Wolfgang.Etl.TestKit.Xunit/ExtractorBaseContractTests.cs b/src/Wolfgang.Etl.TestKit.Xunit/ExtractorBaseContractTests.cs index 368f0760..1328c219 100644 --- a/src/Wolfgang.Etl.TestKit.Xunit/ExtractorBaseContractTests.cs +++ b/src/Wolfgang.Etl.TestKit.Xunit/ExtractorBaseContractTests.cs @@ -328,7 +328,7 @@ public void ExtractAsync_with_null_progress_throws_ArgumentNullException() var ex = Assert.Throws(() => { - _ = sut.ExtractAsync((IProgress)null!); + _ = sut.ExtractAsync(null!); }); Assert.Equal("progress", ex.ParamName); @@ -443,7 +443,7 @@ public void ExtractAsync_with_null_progress_and_token_throws_ArgumentNullExcepti var ex = Assert.Throws(() => { - _ = sut.ExtractAsync((IProgress)null!, CancellationToken.None); + _ = sut.ExtractAsync(null!, CancellationToken.None); }); Assert.Equal("progress", ex.ParamName); diff --git a/src/Wolfgang.Etl.TestKit.Xunit/LoadWithProgressAndCancellationAsyncContractTests.cs b/src/Wolfgang.Etl.TestKit.Xunit/LoadWithProgressAndCancellationAsyncContractTests.cs index cf089350..0bb7ca7e 100644 --- a/src/Wolfgang.Etl.TestKit.Xunit/LoadWithProgressAndCancellationAsyncContractTests.cs +++ b/src/Wolfgang.Etl.TestKit.Xunit/LoadWithProgressAndCancellationAsyncContractTests.cs @@ -213,7 +213,7 @@ public async Task LoadAsync_with_null_progress_throws_ArgumentNullException_Asyn var ex = await Assert.ThrowsAsync ( - () => sut.LoadAsync(AsyncEnumerable.Empty(), (IProgress)null!) + () => sut.LoadAsync(AsyncEnumerable.Empty(), null!) ).ConfigureAwait(false); Assert.Equal("progress", ex.ParamName); @@ -292,7 +292,7 @@ public async Task LoadAsync_with_null_progress_and_token_throws_ArgumentNullExce var ex = await Assert.ThrowsAsync ( - () => sut.LoadAsync(AsyncEnumerable.Empty(), (IProgress)null!, CancellationToken.None) + () => sut.LoadAsync(AsyncEnumerable.Empty(), null!, CancellationToken.None) ).ConfigureAwait(false); Assert.Equal("progress", ex.ParamName); diff --git a/src/Wolfgang.Etl.TestKit.Xunit/LoadWithProgressAsyncContractTests.cs b/src/Wolfgang.Etl.TestKit.Xunit/LoadWithProgressAsyncContractTests.cs index ffa3b418..315d97af 100644 --- a/src/Wolfgang.Etl.TestKit.Xunit/LoadWithProgressAsyncContractTests.cs +++ b/src/Wolfgang.Etl.TestKit.Xunit/LoadWithProgressAsyncContractTests.cs @@ -76,7 +76,7 @@ public async Task LoadAsync_with_null_progress_throws_ArgumentNullException_Asyn var ex = await Assert.ThrowsAsync ( - () => sut.LoadAsync(AsyncEnumerable.Empty(), (IProgress)null!) + () => sut.LoadAsync(AsyncEnumerable.Empty(), null!) ).ConfigureAwait(false); Assert.Equal("progress", ex.ParamName); diff --git a/src/Wolfgang.Etl.TestKit.Xunit/LoaderBaseContractTests.cs b/src/Wolfgang.Etl.TestKit.Xunit/LoaderBaseContractTests.cs index 8ca5a054..5468014c 100644 --- a/src/Wolfgang.Etl.TestKit.Xunit/LoaderBaseContractTests.cs +++ b/src/Wolfgang.Etl.TestKit.Xunit/LoaderBaseContractTests.cs @@ -143,7 +143,7 @@ public async Task LoadAsync_with_null_items_throws_ArgumentNullException_Async() var sut = CreateSut(); var ex = await Assert.ThrowsAsync(() => - sut.LoadAsync((IAsyncEnumerable)null!)).ConfigureAwait(false); + sut.LoadAsync(null!)).ConfigureAwait(false); Assert.Equal("items", ex.ParamName); } @@ -217,7 +217,7 @@ public async Task LoadAsync_with_token_and_null_items_throws_ArgumentNullExcepti var sut = CreateSut(); var ex = await Assert.ThrowsAsync(() => - sut.LoadAsync((IAsyncEnumerable)null!, CancellationToken.None)).ConfigureAwait(false); + sut.LoadAsync(null!, CancellationToken.None)).ConfigureAwait(false); Assert.Equal("items", ex.ParamName); } @@ -338,7 +338,7 @@ public async Task LoadAsync_with_progress_and_null_items_throws_ArgumentNullExce var progress = new SynchronousProgress(_ => { }); var ex = await Assert.ThrowsAsync(() => - sut.LoadAsync((IAsyncEnumerable)null!, progress)).ConfigureAwait(false); + sut.LoadAsync(null!, progress)).ConfigureAwait(false); Assert.Equal("items", ex.ParamName); } @@ -353,7 +353,7 @@ public async Task LoadAsync_with_null_progress_throws_ArgumentNullException_Asyn var sut = CreateSut(); var ex = await Assert.ThrowsAsync(() => - sut.LoadAsync(CreateInputItemsAsync(), (IProgress)null!)).ConfigureAwait(false); + sut.LoadAsync(CreateInputItemsAsync(), null!)).ConfigureAwait(false); Assert.Equal("progress", ex.ParamName); } @@ -473,7 +473,7 @@ public async Task LoadAsync_with_progress_and_token_and_null_items_throws_Argume var progress = new SynchronousProgress(_ => { }); var ex = await Assert.ThrowsAsync(() => - sut.LoadAsync((IAsyncEnumerable)null!, progress, CancellationToken.None)).ConfigureAwait(false); + sut.LoadAsync(null!, progress, CancellationToken.None)).ConfigureAwait(false); Assert.Equal("items", ex.ParamName); } @@ -488,7 +488,7 @@ public async Task LoadAsync_with_progress_and_token_and_null_progress_throws_Arg var sut = CreateSut(); var ex = await Assert.ThrowsAsync(() => - sut.LoadAsync(CreateInputItemsAsync(), (IProgress)null!, CancellationToken.None)).ConfigureAwait(false); + sut.LoadAsync(CreateInputItemsAsync(), null!, CancellationToken.None)).ConfigureAwait(false); Assert.Equal("progress", ex.ParamName); } diff --git a/src/Wolfgang.Etl.TestKit.Xunit/TransformWithProgressAndCancellationAsyncContractTests.cs b/src/Wolfgang.Etl.TestKit.Xunit/TransformWithProgressAndCancellationAsyncContractTests.cs index 26b99f73..29116a77 100644 --- a/src/Wolfgang.Etl.TestKit.Xunit/TransformWithProgressAndCancellationAsyncContractTests.cs +++ b/src/Wolfgang.Etl.TestKit.Xunit/TransformWithProgressAndCancellationAsyncContractTests.cs @@ -205,7 +205,7 @@ public void TransformAsync_with_null_progress_throws_ArgumentNullException() var ex = Assert.Throws(() => { - _ = sut.TransformAsync(AsyncEnumerable.Empty(), (IProgress)null!); + _ = sut.TransformAsync(AsyncEnumerable.Empty(), null!); }); Assert.Equal("progress", ex.ParamName); @@ -282,7 +282,7 @@ public void TransformAsync_with_null_progress_and_token_throws_ArgumentNullExcep var ex = Assert.Throws(() => { - _ = sut.TransformAsync(AsyncEnumerable.Empty(), (IProgress)null!, CancellationToken.None); + _ = sut.TransformAsync(AsyncEnumerable.Empty(), null!, CancellationToken.None); }); Assert.Equal("progress", ex.ParamName); diff --git a/src/Wolfgang.Etl.TestKit.Xunit/TransformWithProgressAsyncContractTests.cs b/src/Wolfgang.Etl.TestKit.Xunit/TransformWithProgressAsyncContractTests.cs index 5f67be11..a9412217 100644 --- a/src/Wolfgang.Etl.TestKit.Xunit/TransformWithProgressAsyncContractTests.cs +++ b/src/Wolfgang.Etl.TestKit.Xunit/TransformWithProgressAsyncContractTests.cs @@ -76,7 +76,7 @@ public void TransformAsync_with_null_progress_throws_ArgumentNullException() var ex = Assert.Throws(() => { - _ = sut.TransformAsync(AsyncEnumerable.Empty(), (IProgress)null!); + _ = sut.TransformAsync(AsyncEnumerable.Empty(), null!); }); Assert.Equal("progress", ex.ParamName); diff --git a/src/Wolfgang.Etl.TestKit.Xunit/TransformerBaseContractTests.cs b/src/Wolfgang.Etl.TestKit.Xunit/TransformerBaseContractTests.cs index 68d9fbcd..f5e18b31 100644 --- a/src/Wolfgang.Etl.TestKit.Xunit/TransformerBaseContractTests.cs +++ b/src/Wolfgang.Etl.TestKit.Xunit/TransformerBaseContractTests.cs @@ -170,7 +170,7 @@ public void TransformAsync_with_null_items_throws_ArgumentNullException() var ex = Assert.Throws(() => { - _ = sut.TransformAsync((IAsyncEnumerable)null!); + _ = sut.TransformAsync(null!); }); Assert.Equal("items", ex.ParamName); @@ -244,7 +244,7 @@ public void TransformAsync_with_token_and_null_items_throws_ArgumentNullExceptio var ex = Assert.Throws(() => { - _ = sut.TransformAsync((IAsyncEnumerable)null!, CancellationToken.None); + _ = sut.TransformAsync(null!, CancellationToken.None); }); Assert.Equal("items", ex.ParamName); @@ -363,7 +363,7 @@ public void TransformAsync_with_progress_and_null_items_throws_ArgumentNullExcep var ex = Assert.Throws(() => { - _ = sut.TransformAsync((IAsyncEnumerable)null!, progress); + _ = sut.TransformAsync(null!, progress); }); Assert.Equal("items", ex.ParamName); @@ -380,7 +380,7 @@ public void TransformAsync_with_null_progress_throws_ArgumentNullException() var ex = Assert.Throws(() => { - _ = sut.TransformAsync(CreateInputItemsAsync(), (IProgress)null!); + _ = sut.TransformAsync(CreateInputItemsAsync(), null!); }); Assert.Equal("progress", ex.ParamName); @@ -496,7 +496,7 @@ public void TransformAsync_with_progress_and_token_and_null_items_throws_Argumen var ex = Assert.Throws(() => { - _ = sut.TransformAsync((IAsyncEnumerable)null!, progress, CancellationToken.None); + _ = sut.TransformAsync(null!, progress, CancellationToken.None); }); Assert.Equal("items", ex.ParamName); @@ -513,7 +513,7 @@ public void TransformAsync_with_progress_and_token_and_null_progress_throws_Argu var ex = Assert.Throws(() => { - _ = sut.TransformAsync(CreateInputItemsAsync(), (IProgress)null!, CancellationToken.None); + _ = sut.TransformAsync(CreateInputItemsAsync(), null!, CancellationToken.None); }); Assert.Equal("progress", ex.ParamName); diff --git a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/BaseClassTests/ClockSeamTests.cs b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/BaseClassTests/ClockSeamTests.cs index 83d40cb6..c384fbc0 100644 --- a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/BaseClassTests/ClockSeamTests.cs +++ b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/BaseClassTests/ClockSeamTests.cs @@ -164,7 +164,7 @@ private sealed class ClockLoader : LoaderBase protected override async Task LoadWorkerAsync(IAsyncEnumerable items, CancellationToken token) { - await foreach (var item in items.WithCancellation(token).ConfigureAwait(false)) + await foreach (var _ in items.WithCancellation(token).ConfigureAwait(false)) { IncrementCurrentItemCount(); } diff --git a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/BaseClassTests/RetrySeamTests.cs b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/BaseClassTests/RetrySeamTests.cs index 1d9d9636..57970d64 100644 --- a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/BaseClassTests/RetrySeamTests.cs +++ b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/BaseClassTests/RetrySeamTests.cs @@ -240,7 +240,7 @@ protected override async IAsyncEnumerable WrapWorkerExecution( SeamCallCount++; if (WorkerRuns == 1) { - await foreach (var item in base.WrapWorkerExecution(workerFactory, token).WithCancellation(token)) + await foreach (var item in base.WrapWorkerExecution(workerFactory, token)) { yield return item; } @@ -427,7 +427,7 @@ protected override async IAsyncEnumerable WrapWorkerExecution( SeamCallCount++; if (WorkerRuns == 1) { - await foreach (var item in base.WrapWorkerExecution(workerFactory, token).WithCancellation(token)) + await foreach (var item in base.WrapWorkerExecution(workerFactory, token)) { yield return item; } diff --git a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/BaseClassTests/SystemProgressTimerTests.cs b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/BaseClassTests/SystemProgressTimerTests.cs index 3647160c..564f691d 100644 --- a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/BaseClassTests/SystemProgressTimerTests.cs +++ b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/BaseClassTests/SystemProgressTimerTests.cs @@ -97,12 +97,10 @@ public async Task Start_after_dispose_does_not_throw() public async Task Timer_callback_fires_during_extraction() { var elapsedCount = 0; - IProgressTimer? capturedTimer = null; var sut = new CapturingExtractor( onTimerCreated: t => { - capturedTimer = t; t.Elapsed += () => Interlocked.Increment(ref elapsedCount); }, intervalMs: 30, diff --git a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/EtlPipelineTests/AggregateErrorsTests.cs b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/EtlPipelineTests/AggregateErrorsTests.cs index eb9d4d47..d325a9f7 100644 --- a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/EtlPipelineTests/AggregateErrorsTests.cs +++ b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/EtlPipelineTests/AggregateErrorsTests.cs @@ -219,7 +219,7 @@ private sealed class ErroringLoader : LoaderBase protected override async Task LoadWorkerAsync(IAsyncEnumerable items, CancellationToken token) { - await foreach (var item in items.WithCancellation(token)) + await foreach (var _ in items.WithCancellation(token)) { IncrementCurrentItemCount(); } diff --git a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/EtlPipelineTests/EtlPipelineTests.cs b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/EtlPipelineTests/EtlPipelineTests.cs index ca4f22da..9a1f7d5d 100644 --- a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/EtlPipelineTests/EtlPipelineTests.cs +++ b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/EtlPipelineTests/EtlPipelineTests.cs @@ -314,7 +314,7 @@ public void From_when_stream_is_null_throws_ArgumentNullException() { Assert.Throws(() => EtlPipeline .Create() - .From((IAsyncEnumerable)null!)); + .From(null!)); } diff --git a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/PipelineTests/NullGuardOnChainedStagesTests.cs b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/PipelineTests/NullGuardOnChainedStagesTests.cs index 6817af1a..d22b576a 100644 --- a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/PipelineTests/NullGuardOnChainedStagesTests.cs +++ b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/PipelineTests/NullGuardOnChainedStagesTests.cs @@ -70,7 +70,7 @@ public void TransformStage_Load_cancel_null_throws() { Assert.Throws ( - () => MidChainStage().Load((ILoadWithCancellationAsync)null!) + () => MidChainStage().Load(null!) ); } diff --git a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/PipelineTests/PipelineBehaviorTests.cs b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/PipelineTests/PipelineBehaviorTests.cs index ea408d08..66e068bb 100644 --- a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/PipelineTests/PipelineBehaviorTests.cs +++ b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/PipelineTests/PipelineBehaviorTests.cs @@ -113,7 +113,7 @@ public void Bare_Load_when_loader_is_null_throws() public void CancelOnly_Load_when_loader_is_null_throws() { var stage = Pipeline.Extract(new BareExtractor(new[] { 1 })); - Assert.Throws(() => stage.Load((ILoadWithCancellationAsync)null!)); + Assert.Throws(() => stage.Load(null!)); } diff --git a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/PipelineTests/TestDoubles/Extractors.cs b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/PipelineTests/TestDoubles/Extractors.cs index c6c45c77..ada096e7 100644 --- a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/PipelineTests/TestDoubles/Extractors.cs +++ b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/PipelineTests/TestDoubles/Extractors.cs @@ -199,10 +199,10 @@ public async IAsyncEnumerable ExtractAsync(IProgress progress) } - public async IAsyncEnumerable ExtractAsync + public IAsyncEnumerable ExtractAsync ( IProgress progress, - [EnumeratorCancellation] CancellationToken token + CancellationToken token ) { if (progress is null) @@ -210,6 +210,18 @@ [EnumeratorCancellation] CancellationToken token throw new ArgumentNullException(nameof(progress)); } + // Split so the null check runs eagerly at call time rather than being + // deferred to the first MoveNextAsync of the iterator (S4456). + return ExtractFullCoreAsync(progress, token); + } + + + private async IAsyncEnumerable ExtractFullCoreAsync + ( + IProgress progress, + [EnumeratorCancellation] CancellationToken token + ) + { FullOverloadWasCalled = true; LastReceivedProgress = progress; LastReceivedToken = token; diff --git a/tests/Wolfgang.Etl.TestKit.Tests.DocExamples/DocExampleCompilationTests.cs b/tests/Wolfgang.Etl.TestKit.Tests.DocExamples/DocExampleCompilationTests.cs index fa255df0..609734a3 100644 --- a/tests/Wolfgang.Etl.TestKit.Tests.DocExamples/DocExampleCompilationTests.cs +++ b/tests/Wolfgang.Etl.TestKit.Tests.DocExamples/DocExampleCompilationTests.cs @@ -228,7 +228,7 @@ private static IReadOnlyList ReferenceAssemblies() var tree = CSharpSyntaxTree.ParseText ( source, - new CSharpParseOptions(LanguageVersion.Latest, DocumentationMode.Parse) + new CSharpParseOptions(LanguageVersion.Latest) ); var docComments = tree.GetRoot() diff --git a/tests/Wolfgang.Etl.TestKit.Tests.Unit/DelayingExtractorTests.cs b/tests/Wolfgang.Etl.TestKit.Tests.Unit/DelayingExtractorTests.cs index 44f6935f..90b4ba89 100644 --- a/tests/Wolfgang.Etl.TestKit.Tests.Unit/DelayingExtractorTests.cs +++ b/tests/Wolfgang.Etl.TestKit.Tests.Unit/DelayingExtractorTests.cs @@ -28,7 +28,7 @@ public void Constructor_when_delaySelector_is_null_throws_ArgumentNullException( { Assert.Throws ( - () => new DelayingExtractor(new[] { 1 }, (Func)null!) + () => new DelayingExtractor(new[] { 1 }, null!) ); } diff --git a/tests/Wolfgang.Etl.TestKit.Tests.Unit/TestExtractorTests.cs b/tests/Wolfgang.Etl.TestKit.Tests.Unit/TestExtractorTests.cs index 4f4c3cb9..c3fe7512 100644 --- a/tests/Wolfgang.Etl.TestKit.Tests.Unit/TestExtractorTests.cs +++ b/tests/Wolfgang.Etl.TestKit.Tests.Unit/TestExtractorTests.cs @@ -757,7 +757,7 @@ public void Constructor_with_indexed_factory_and_timer_when_timer_is_null_throws { var ex = Assert.Throws ( - () => new TestExtractorWithTimer((Func)(i => i), null!) + () => new TestExtractorWithTimer(i => i, null!) ); Assert.Equal("timer", ex.ParamName); @@ -785,7 +785,7 @@ public void Constructor_with_indexed_factory_count_and_timer_when_count_is_negat using var timer = new ManualProgressTimer(); var ex = Assert.Throws ( - () => new TestExtractorWithTimer((Func)(i => i), -1, timer) + () => new TestExtractorWithTimer(i => i, -1, timer) ); Assert.Equal("count", ex.ParamName); @@ -798,7 +798,7 @@ public void Constructor_with_indexed_factory_count_and_timer_when_timer_is_null_ { var ex = Assert.Throws ( - () => new TestExtractorWithTimer((Func)(i => i), 3, null!) + () => new TestExtractorWithTimer(i => i, 3, null!) ); Assert.Equal("timer", ex.ParamName); diff --git a/tests/Wolfgang.Etl.TestKit.Xunit.Tests.Unit/ProgressAssertTests.cs b/tests/Wolfgang.Etl.TestKit.Xunit.Tests.Unit/ProgressAssertTests.cs index 0a8ea451..6a60ea5d 100644 --- a/tests/Wolfgang.Etl.TestKit.Xunit.Tests.Unit/ProgressAssertTests.cs +++ b/tests/Wolfgang.Etl.TestKit.Xunit.Tests.Unit/ProgressAssertTests.cs @@ -261,7 +261,7 @@ public void FinalReportSatisfies_when_predicate_null_throws_ArgumentNullExceptio var capture = new ProgressCapture(); Assert.Throws(() => - ProgressAssert.FinalReportSatisfies(capture, null!)); + ProgressAssert.FinalReportSatisfies(capture, null!)); } @@ -331,7 +331,7 @@ public void AllReportsSatisfy_when_predicate_null_throws_ArgumentNullException() var capture = new ProgressCapture(); Assert.Throws(() => - ProgressAssert.AllReportsSatisfy(capture, null!)); + ProgressAssert.AllReportsSatisfy(capture, null!)); } diff --git a/tests/Wolfgang.Etl.TestKit.Xunit.Tests.Unit/RetryingExtractorRetryContractTests.cs b/tests/Wolfgang.Etl.TestKit.Xunit.Tests.Unit/RetryingExtractorRetryContractTests.cs index 68a33c94..1011dec3 100644 --- a/tests/Wolfgang.Etl.TestKit.Xunit.Tests.Unit/RetryingExtractorRetryContractTests.cs +++ b/tests/Wolfgang.Etl.TestKit.Xunit.Tests.Unit/RetryingExtractorRetryContractTests.cs @@ -25,7 +25,7 @@ protected override Task RunWithPermanentFaultAsync(int maxAttempts private static async Task DriveAsync(RetryingExtractor sut) { var itemCount = 0; - var succeeded = false; + bool succeeded; try {