This repository contains a basic set of code examples useful for visualizing the differences between TestNG
's core assertions against Hamcrest
matchers.
Any of the tests can be executed using your IDE's (e.g. IntelliJ IDEA) test runner.
Alternatively, any Test Suite can be run using maven by specifying the XML file like so:
mvn clean test -DsuiteXmlFile=src/test/resources/empty_or_null_string_comparisson.xml
Additional documentation and examples can be found here:
Official
http://hamcrest.org/JavaHamcrest/tutorial http://hamcrest.org/JavaHamcrest/javadoc/2.0.0.0/
Third party tutorials
https://www.baeldung.com/java-junit-hamcrest-guide https://www.baeldung.com/hamcrest-core-matchers https://www.baeldung.com/hamcrest-text-matchers https://www.baeldung.com/hamcrest-number-matchers https://www.baeldung.com/hamcrest-bean-matchers