Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assert on map should have keys() and values() functions #527

Open
dalewking opened this issue Apr 17, 2024 · 2 comments
Open

Assert on map should have keys() and values() functions #527

dalewking opened this issue Apr 17, 2024 · 2 comments

Comments

@dalewking
Copy link

There are good assertions on individual items in maps but not a clean way to do assertions on all keys or all values in a map. So i propose the following methods be added:

fun <K> Assert<Map<K, *>>.keys() : Assert<Set<K>> = ...

fun <V> Assert<Map<*, V>>.values() : Assert<Collection<V>> = ...
@JakeWharton
Copy link
Contributor

These will probably be havingKeys() and havingValues() based on the discussion in #522 and #521.

@dalewking
Copy link
Author

These will probably be havingKeys() and havingValues() based on

Makes sense. I care about the functionality, not the name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants