-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
Description
The ObjectAssertion class currently has methods for keys, values, and entries that work with a "containing" behavior:
- .toContainAll[Keys|Values|Entries]: Checks if all the passed values are contained in the keys/values/entries array, but we don't know if a value is missing.
- .toContainAny[Keys|Values|Entries]: Checks if any of the passed values are contained in the keys/values/entries array. We don't really care if there are extra or missing values.
We are missing methods that work with a "to have exactly" behavior, so we need to implement the following:
.toHaveKeys(..): Checks if the object has exactly the provided keys.toHaveValues(..): Checks if the object has exactly the provided values.toHaveEntries(..): Checks if the object has exactly the provided entries. Similar to.toBeEqual(..), but allows an array of entries as arguments instead.