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

New Post: Why doesn't NotBeSameAs() work with GenericCollectionAssertions?

$
0
0
I'm implementing a special case of an immutable dictionary, which for convenience implements IEnumerable<KeyValuePair<Foo, Bar>>. Operations that would ordinarily modify the dictionary should instead return a new instance. But if I try to use NotBeSameAs to check that these new instances are in fact new instances, I can't.

I would think this is just a hole in the implementation, but I ran into the same problem with the Should framework, which, since I'm relatively new to C#, makes me wonder if I'm missing something conceptual about .NET collections.

Viewing all articles
Browse latest Browse all 1402

Trending Articles



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