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
Maybe ASSERT.that() method should fail if no methods were called on, like Mockito which detects if we correctly wrote mock and verify. You check that at the end of test method in case there's only one ASSERT.that() and for each ASSERT.that() invocation, to validate the previous one.
I think this is actually something we want to put into error-prone, and recommend people use it. I don't think this is solvable with a fluent API because of the "turn the crank" issue - JAva needs the last method to be the one that turns the crank. There's no signal that "it's over, and no one turned the crank". But error-prone does pattern analysis on code, so it might be the best way.
I just saw this in a code review:
ASSERT.that(collection.containsAll(values));
What was meant was:
ASSERT.that(collection).containsAll(values);
(The error was a little less obvious in the real code, where "collection" and "values" were longer expressions.)
I don't really have a solution here.
The text was updated successfully, but these errors were encountered: