willowtreeapps / assertk

assertions for kotlin inspired by assertj
MIT License
771 stars 87 forks source link

Add support for Sequence #378

Closed johanhaleby closed 1 year ago

johanhaleby commented 3 years ago

Hi,

I'd like to be able to do assertions on sequences. For example:

val seq = sequenceOf("one", "two")
assertThat(seq).containsOnly("one", "two")

But this doesn't compile unless I convert it to an Iterable. Would it make sense to explicitly support Sequences?

evant commented 3 years ago

Yeah I think that's a good idea. We could have all the same assertions from Iterable