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

Commented Issue: Compare non-nullable to nullable types [11837]

$
0
0
It would be nice to support this scenario:

var number = 5;
var nullableNumber = (int?) 5;
number.Should().Be(nullableNumber);

is better than:

number.Should().Be(nullableNumber.Value)

when nullableNumber is null (we can display a better error message than NullObjectException).
Comments: ** Comment from web user: dennisdoomen **

I've just reopened the issue, so you won't have to file another one


Viewing all articles
Browse latest Browse all 1402

Trending Articles



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