-
-
Notifications
You must be signed in to change notification settings - Fork 234
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
andThen support after condition has been evaluated? #68
Comments
Hi, Would this be enough? List<String> someList = await().atMost(5, SECONDS).until(() -> someList, hasSize(1)));
assertThat(someList.get(0), is(equalTo("hello")) /Johan |
i thought it might be, but I was just about to answer my own question with this
That seems to run |
whoops - you are right - some dodgy logic in my code meant the next bit of code ran after the await() blocked but didn't report correctly. Apologies - close this and ignore me ;) Thanks for your quick replies |
No problem, thanks for using the library :) |
Apologies if I'm coming at this from the wrong angle but is there any support (or direction of how i should do this) for running some code after the condition has been evaluated to true e.g. my current code is as follows
await().atMost(5, SECONDS).until(() -> someList.size(), is(equalTo(1))
is there any support for something like
await().atMost(5, SECONDS).until(() -> someList.size(), is(equalTo(1)).andThen(() -> assertThat(someList.get(0), is(equalTo("hello")))
so I know there is definitely 1 message, now I can do more assertions on the contents of the list
The text was updated successfully, but these errors were encountered: