func.Should().Return(expected).After(waitTime, pollInterval); #2620
inikulshin
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I don't really like the code, I need to write for retrying
t.GetStatus()
until it returnsexpected
value:It's not "nice" and also, if
action
throws before the 1st assertion (int.GetStatus()
), the 2nd assertion won't fail immediately becauseNotThrowAfter
catches every exception forwaitTime
period.I think, a more readable and correct API should have only one
Should()
, e.g.or
or even
I didn't get into the code, so I don't know that are limitations of every option, but the main idea is clear.
Beta Was this translation helpful? Give feedback.
All reactions