Skip to content

Add tests for nullable Task - #994

Merged
zvirja merged 1 commit into
nsubstitute:mainfrom
zvirja:test-725-nullable-task-returns
Aug 11, 2026
Merged

Add tests for nullable Task#994
zvirja merged 1 commit into
nsubstitute:mainfrom
zvirja:test-725-nullable-task-returns

Conversation

@zvirja

@zvirja zvirja commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Closes #725

Add tests to highlight that we handle scenarios from the issue via Task extensions.

…Nullable<T>>/ValueTask<Nullable<T>>

Covers the scenario from nsubstitute#725's latest comment where a member returning
Task<int?>/ValueTask<int?> is configured with a plain non-nullable value via
Returns(); previously only ReturnsNull() was covered for these members.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@zvirja
zvirja requested a review from dtchepak August 11, 2026 10:06
@zvirja
zvirja merged commit 299de05 into nsubstitute:main Aug 11, 2026
4 checks passed
@zvirja
zvirja deleted the test-725-nullable-task-returns branch August 11, 2026 10:33
This was referenced Aug 11, 2026
This was referenced Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ambiguous method call for Task of nullable types

2 participants