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

New Post: The name BeEquivalentTo() is misleading for strings

$
0
0

Hi!

The name of string assertion BeEquivalentTo looks misleading to me.

For collection assertions it means "contains same elements regardless of order".

For strings equivalence means case-insensitive comparison.

But if you consider string as a collection of characters then these definitions contradict each other.

Also the name should give clear understanding of what the method does without looking at intellisense (for example when browsing source code of some project via web browser).

Better name would be something like BeIgnoreCase or BeIgnoringCase or BeRegardlessCase or BeAnyCase or BeInAnyCase or are there even better options?


Viewing all articles
Browse latest Browse all 1402

Trending Articles