Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- +1 I totally agree with you, it is a good practice to write a descriptive messages and it is something that we have to try to do.
- But I think that's why we are using Hamcrest and writing assertion in a pseudo-natural language (using asserThat, is(), not(), equalTo(), etc) an not another common assertions, because this library generates for us a compressible message for the developers.
- For instance, if you write this assert:
- assertThat(6, is(not(greaterThan(5))));
- Hamcrest generate for you this message:
- Expected: is not a value greater than <5>
- but was <6>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement