Method hasOnlyElementsOfType for Iterables
Open
P3
type=addition
- Dominant language
- Java
- Stars
- 2.8k
- Forks
- 275
- Avg merge
- 7m
- Merged PRs (30d)
- 4
Description
Hello everyone,
I was migrating from assertJ to Truth, and I found no alternative method to hasOnlyElementsOfType for Iterables.
I've used as an alternative this method:
```
private void assertHasOnlyElementsOfType(@NonNull final Iterable iterable, @NonNull final Class classType) {
for (Object object : iterable) {
assertThat(object).isInstanceOf(classType);
}
}
```
Could you consider adding something similar in the future?
Thanks in advance,
Keep up the awesome work!
Contributor guide
Assessment
This issue has not been assessed yet.