Description
Custom comparer support varies significantly across assertion types:
CollectionContainsAssertion accepts IEqualityComparer<TItem>? in constructor
IsEquivalentToAssertion has .Using(Func<...>) method
DictionaryContainsKeyAssertion has both .Using(IEqualityComparer<TKey>) and .Using(Func<...>)
- Some assertions accept comparer in constructor, others via fluent method
Suggested Fix
Standardize the API:
- Always use
.Using() for fluent API (consistent method name)
- Document semantics clearly (does it replace or augment default comparer?)
- Support both
IEqualityComparer<T> and Func<T, T, bool> overloads uniformly
Description
Custom comparer support varies significantly across assertion types:
CollectionContainsAssertionacceptsIEqualityComparer<TItem>?in constructorIsEquivalentToAssertionhas.Using(Func<...>)methodDictionaryContainsKeyAssertionhas both.Using(IEqualityComparer<TKey>)and.Using(Func<...>)Suggested Fix
Standardize the API:
.Using()for fluent API (consistent method name)IEqualityComparer<T>andFunc<T, T, bool>overloads uniformly