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
+1 from my side, as this happened to me several times (with another fluent lib). It would be nice if strikt could tell the tester that he's shooting his own foot in such cases ...
Seriously, though. I think it's a good suggestion. I'm not sure how it could be implemented right now. I'd need to somehow detect that no methods were ever called on the Assertion.Builder returned by expect.
it probably would need to be test runner specific. all expectations in a test case need to be registered and then checked afterwards. or you could use a threadlocal where each expect checks that the expect before it had a check.
one downside of fluent assertion libs like strikt compared to simple assertEquals(a,b) is that its possible to write assertions that can never fail.
for example this code that tries to assert on a jackson property:
expect(offer.has("id"))
it would be great if we could find a way that can potentially find such asserts, possibly at runtime.
The text was updated successfully, but these errors were encountered: