You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.
This is because the both matcher, from core, is causing both matchers to be checked, one after the other, and therefore the stream is being reused after it has been read.
Ideally we'd have some clever way of combining stream matchers, but currently we don't. You can try to twist your assertion logic in order to create something that can be checked in one pass, but it's trivially simple to come up with examples where this can't be done (such as yours).
Sounds like a nice feature, I don't suppose you'd like to propose a solution and raise a PR, would you? ;)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This one works:
but now... there is another requirement!!!
The stream must not contain any zeros.
So I tried:
which fails with IllegalStateException: stream has already been operated upon or closed
Seems that the
both
matcher causes the stream to be operated twice.Other issue? Anyway to overcome this?
The text was updated successfully, but these errors were encountered: