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

Created Issue: GenericDictionaryAssertions.Equal broken for dictionary with null value [12004]

$
0
0
dictionary.Should().Equal(new Dictionary<string, object> { { "name", null } });

This throws NullReferenceException because the code in GenericDictionaryAssertions uses .Equal on the null value. Existing code:
Execute.Verification
.ForCondition(Subject[key].Equals(expected[key]))

If the Subject[key] is null, the above will throw even if the expected[key] is also null (in which case I would expect it to pass).

Viewing all articles
Browse latest Browse all 1402

Latest Images

Trending Articles



Latest Images

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