Quantcast
Channel: Fluent Assertions
Viewing all articles
Browse latest Browse all 1402

Commented Issue: Assertion HaveValue and NotHaveValue are missing for Nullable [11660]

$
0
0
I´m using FluentAssertions 1.7.0 and the methods HaveValue and NotHaveValue are missing for properties of type Nullable<int>.

For Nullable<DateTime> they are present.

Test:

Nullable<DateTime> date = null;
date.Should().HaveValue(); //Method is present
date.Should().HaveNotValue(); //Method is present

Nullable<int> value= null;
value.Should().HaveValue(); //Method is NOT present
value.Should().HaveNotValue(); //Method is NOT present

I checked the sourcecode and it seems there are assertions available for NullableNumerics, but they are not available.
Comments: ** Comment from web user: dennisdoomen **

I've just checked the source code, and they are there. See the first few specs in the NullableNumericAssertionSpecs class. Are you missing a namespace?


Viewing all articles
Browse latest Browse all 1402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>