Assumes.NotNull support Nullable<T> struct
iron9light opened this issue · 3 comments
iron9light commented
Now, Assumes.NotNull only supports reference type as a parameter.
iron9light commented
Should I use Assumes.Present<T>
for this case?
AArnott commented
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.