I am looking for a Java library that allows you to map a sequence of objects, potentially mixing with types like hamcrest.
Ideally, I would like to write a test that can verify that iterability contains a sequence that will look like a regular expression, but for objects, not characters:
assertThat(myList).inSequence(oneOrMore(any()),zeroOrMore(equals(MyObject)));
Mockito with validation is close to what I would like, but some simple matches are missing (e.g. zeroOrMore)
Alexander
source
share