fluentassertions icon indicating copy to clipboard operation
fluentassertions copied to clipboard

Check for key value pair with out case

Open akshetty9 opened this issue 9 years ago • 4 comments

Is it possible to ignore the case when asserting a key value pair present in dictionary. Any option Contains() will do this?

akshetty9 avatar Jul 08 '16 09:07 akshetty9

Nope. Sorry. But I do accept pull requests ;-)

dennisdoomen avatar Jul 08 '16 10:07 dennisdoomen

thank you. I will try :)

akshetty9 avatar Jul 08 '16 12:07 akshetty9

This seems like an unusual one considering that the dictionary itself doesn't work that way unless a custom comparer is used. @dennisdoomen Does fluent assertions leverage the comparer of the dictionary when doing such comparisons or does it always do the same thing regardless of the dictionary comparer?

somewhatabstract avatar Nov 07 '16 06:11 somewhatabstract

It relies on the object.Equals for most of the comparisons, so it should be possible to create such an enhancement.

dennisdoomen avatar Nov 07 '16 06:11 dennisdoomen