-
Notifications
You must be signed in to change notification settings - Fork 15
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
Risk of Assertions doing nothing when .is(true) is missing #320
Comments
For the second best solution: |
Yes, this is a design flaw of the inline assertion API. I think a good solution would be, to warn for unfulfilled public void finalize() {
if (!_fullfilled) {
log().warn(createFailMessage(" was not fulfilled"));
}
} |
I've stumbled across this situation as well. Another possible annotation I would suggest, is |
Do you mean a
The best way but with the biggest pain is to clean the Assertion API, maybe the removal of Other helpers like |
Problem.
This does an assertion:
uiElement.assertThat().text().is("text");
This reads and feels the same but does nothing:
uiElement.assertThat().text().contains("sisdfn");
The main problem is that i won't notice my mistake which leads to tests that don't do the assertions i expect them to do.
Solution
Best would be an implicit
.is(true)
when no assertion is done.Second best seems the addition of a compiler warning or something alike, to increase my chance of noticing my mistake, see e.g.
The text was updated successfully, but these errors were encountered: