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 · May be fixed by #557
Open

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

dalewking opened this issue Apr 17, 2024 · 2 comments · May be fixed by #557

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

Successfully merging a pull request may close this issue.

3 participants