Advertisement
Guest User

Untitled

a guest
Apr 18th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1.  
  2. +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.
  3.  
  4. 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.
  5.  
  6. For instance, if you write this assert:
  7.  
  8. assertThat(6, is(not(greaterThan(5))));
  9.  
  10. Hamcrest generate for you this message:
  11.  
  12. Expected: is not a value greater than <5>
  13. but was <6>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement