diff --git a/Directory.Packages.props b/Directory.Packages.props index 8925182..4c87138 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -16,7 +16,7 @@ - + diff --git a/tests/DotnetTokenKiller.Application.Tests/UseCases/ConfigSetUseCaseTests.cs b/tests/DotnetTokenKiller.Application.Tests/UseCases/ConfigSetUseCaseTests.cs index b9901e0..847483d 100644 --- a/tests/DotnetTokenKiller.Application.Tests/UseCases/ConfigSetUseCaseTests.cs +++ b/tests/DotnetTokenKiller.Application.Tests/UseCases/ConfigSetUseCaseTests.cs @@ -17,7 +17,7 @@ public ConfigSetUseCaseTests() _configProvider.LoadAsync().ReturnsForAnyArgs(DtkConfig.Default); _configProvider.SaveAsync(null!) .ReturnsForAnyArgs(Task.CompletedTask) - .AndDoes(call => _savedConfig = call.Arg()); + .AndDoes(call => _savedConfig = call.Arg()!); } [Fact] diff --git a/tests/DotnetTokenKiller.Application.Tests/UseCases/FilteredRunUseCaseTests.cs b/tests/DotnetTokenKiller.Application.Tests/UseCases/FilteredRunUseCaseTests.cs index b8df469..877d39e 100644 --- a/tests/DotnetTokenKiller.Application.Tests/UseCases/FilteredRunUseCaseTests.cs +++ b/tests/DotnetTokenKiller.Application.Tests/UseCases/FilteredRunUseCaseTests.cs @@ -117,7 +117,7 @@ public async Task RunAsync_RecordsCorrectTokenCounts_AfterSuccessfulExecution() await _tracker.Received(1).RecordAsync( Arg.Is(r => - r.Command == "build" && + r!.Command == "build" && r.InputTokens == 6 && r.OutputTokens == 2 && r.SavedTokens == 4), @@ -136,7 +136,7 @@ public async Task RunAsync_RecordsCorrectCommand_WhenArgsProvided() await _sut.RunAsync(_filter, "dotnet", BuildArgs, 0); await _tracker.Received(1).RecordAsync( - Arg.Is(r => r.Command == "build"), + Arg.Is(r => r!.Command == "build"), Arg.Any()); } @@ -152,7 +152,7 @@ public async Task RunAsync_RecordsCorrectCommand_WhenNoArgs_UsesCommandName() await _sut.RunAsync(_filter, "dotnet", [], 0); await _tracker.Received(1).RecordAsync( - Arg.Is(r => r.Command == "dotnet"), + Arg.Is(r => r!.Command == "dotnet"), Arg.Any()); } @@ -170,7 +170,7 @@ public async Task RunAsync_RecordsNegativeSavedTokens_WhenFilterExpandsOutput() await _tracker.Received(1).RecordAsync( Arg.Is(r => - r.InputTokens == 2 && + r!.InputTokens == 2 && r.OutputTokens == 6 && r.SavedTokens == -4 && r.SavingsPercentage < 0), @@ -374,7 +374,7 @@ public async Task RunAsync_ZeroTokens_RecordsZeroPercentSavings() await _tracker.Received(1).RecordAsync( Arg.Is(r => - r.InputTokens == 0 && + r!.InputTokens == 0 && r.OutputTokens == 0 && Math.Abs(r.SavingsPercentage) < 0.01), Arg.Any()); @@ -395,7 +395,7 @@ public async Task RunAsync_VerifiesSavingsPercentageCalculation() await _tracker.Received(1).RecordAsync( Arg.Is(r => - r.InputTokens == 2 && + r!.InputTokens == 2 && r.OutputTokens == 1 && r.SavedTokens == 1 && Math.Abs(r.SavingsPercentage - 50.0) < 0.01), @@ -499,7 +499,7 @@ public async Task RunAsync_EmptyRawOutput_RecordsZeroSavingsPct() await _sut.RunAsync(_filter, "dotnet", BuildArgs, 0); await _tracker.Received(1).RecordAsync( - Arg.Is(r => Math.Abs(r.SavingsPercentage) < 0.001), + Arg.Is(r => Math.Abs(r!.SavingsPercentage) < 0.001), Arg.Any()); } @@ -678,7 +678,7 @@ public async Task RunAsync_ZeroExitCode_RecordsSuccessTrue() await _sut.RunAsync(_filter, "dotnet", BuildArgs, 0); await _tracker.Received(1).RecordAsync( - Arg.Is(r => r.Success), + Arg.Is(r => r!.Success), Arg.Any()); } @@ -695,7 +695,7 @@ public async Task RunAsync_NonZeroExitCode_RecordsSuccessFalse() await _sut.RunAsync(_filter, "dotnet", BuildArgs, 0); await _tracker.Received(1).RecordAsync( - Arg.Is(r => !r.Success), + Arg.Is(r => !r!.Success), Arg.Any()); }