chore(tests): clear all build warnings - #89
Merged
Conversation
Drives the solution to a warning-free build. - CS8604 (possible null reference argument, 26 sites, test-only): NSubstitute Arg.Is<T[]>(...) matcher lambdas get a nullable parameter, so guard the predicate with `param != null &&` before calling .Contains (matching the existing convention already used elsewhere in these files); CallInfo.Arg<T>() values passed to Add/TrySetResult use the null-forgiving operator. - NU1608: AutoFixture.AutoNSubstitute 4.18.1 caps NSubstitute at <6.0.0, but the pin is 6.0.0 (latest) and passes all tests. No AutoFixture version (incl. 5.0 previews) yet allows NSubstitute 6, so suppress the transitive constraint notice in the test project rather than downgrade. No product code changes. Full suite green on net8.0 and net10.0 (1182/1182 each); build emits 0 warnings. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Cosmin Staicu <cosmin.staicu@uipath.com>
cosmin-staicu
requested review from
alinahornet,
cosminvlad,
litheon,
lucianaparaschivei and
razvalex
as code owners
July 17, 2026 10:26
razvalex
approved these changes
Jul 17, 2026
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Drives the solution to a warning-free build (0 warnings, down from 104 CS8604 + 6 NU1608). Test/build hygiene only — no product code changes.
Changes
RedisCacheTests,MultilayerCacheTests,RedisPubSubTopicTests,RedisStreamNotifyChannelTests,RedisStreamSubjectWriterTests):Arg.Is<T[]>(k => k.Contains(...))matcher lambdas receive a nullable parameter, so the predicates now guard withk != null && ...before.Contains— matching the convention already used elsewhere in these files (e.g.MultilayerCacheTestslines 169/1004).CallInfo.Arg<T>()values passed toList.Add/TaskCompletionSource.TrySetResultuse the null-forgiving operator (!).AutoFixture.AutoNSubstitute 4.18.1capsNSubstituteat< 6.0.0, but the pin is6.0.0(the latest stable) and passes all tests. NoAutoFixture.AutoNSubstituteversion — including5.0.0-preview— yet permits NSubstitute 6, so the constraint notice is suppressed in the test project (NoWarn) with a justifying comment, rather than downgrading off the latest NSubstitute.Test plan
dotnet test)Full suite green on net8.0 and net10.0 (1182/1182 each), and a forced rebuild (
--no-incremental) emits 0 warnings.Linked issues
Fixes #
Contributor declaration
git commit -s).🤖 Generated with Claude Code