Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assumes.NotNull support Nullable<T> struct #43

Closed
iron9light opened this issue Aug 27, 2019 · 3 comments
Closed

Assumes.NotNull support Nullable<T> struct #43

iron9light opened this issue Aug 27, 2019 · 3 comments

Comments

@iron9light
Copy link
Contributor

Now, Assumes.NotNull only supports reference type as a parameter.

@iron9light
Copy link
Contributor Author

Should I use Assumes.Present<T> for this case?

@AArnott
Copy link
Member

AArnott commented Jun 30, 2020

No, Present<T> is meant for service non-null checks so the exception message it would throw would not be appropriate.
You can use Assumes.True(nullableStruct.HasValue); instead.

@AArnott
Copy link
Member

AArnott commented Jun 30, 2020

Actually looking at the API we offer, this was addressed by #45

@AArnott AArnott closed this as completed Jun 30, 2020
AArnott referenced this issue in AArnott/vs-validation Apr 11, 2022
Collect dumps and sequence.xml files on test hangs and crashes
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

No branches or pull requests

2 participants