Class name has to be before method, must be MatcherAssert.assertThat() and not just assertThat()?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Class name has to be before method, must be MatcherAssert.assertThat() and not just assertThat()?



I'm using hamcrest matchers for a test. Why is it that I have to write


MatcherAssert.assertThat(a, Is.is(b));



and not just this?


assertThat(a, is(b));



My program errors when I try to use the latter. I really want to be able to use the latter because I need this code to be readable for someone who doesn't really know how to code.









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard