I want to assert on HTTP response headers, but the DictionaryContainsKeyValuePairConstraint created by Contains.Key(...).WithValue(...) does not work on the type.
Currently the constraint checks for IDictionary and (despite the error message) also IDictionary<TKey, TValue>.
However, the HttpHeaders type implements IEnumerable<KeyValuePair<string, IEnumerable<string>>> (and of course the non-generic IEnumerable interface implicitly) and nothing else.
Would it be acceptable to expand the checks on this contraint to allow IEnumerable<KeyValuePair<TKey, TValue>> as well? I'm happy to work on it if the change would be accepted.
I want to assert on HTTP response headers, but the
DictionaryContainsKeyValuePairConstraintcreated byContains.Key(...).WithValue(...)does not work on the type.Currently the constraint checks for
IDictionaryand (despite the error message) alsoIDictionary<TKey, TValue>.However, the
HttpHeaderstype implementsIEnumerable<KeyValuePair<string, IEnumerable<string>>>(and of course the non-genericIEnumerableinterface implicitly) and nothing else.Would it be acceptable to expand the checks on this contraint to allow
IEnumerable<KeyValuePair<TKey, TValue>>as well? I'm happy to work on it if the change would be accepted.