-
Gradle and JUnit example
In Gradle, you can declare the JUnit dependency like this:
Date: 2019-08-17 View: 1520
-
Hamcrest How to assertThat check null value?
Try to check null value with the Hamcrest assertThat assertion, but no idea how?
Date: 2019-08-17 View: 1520
-
JUnit How to test a List
First, exclude the JUnit bundled copy of hamcrest-core, and include the useful hamcrest-library, it contains many useful methods to test the List data type.
Date: 2019-08-17 View: 1520
-
JUnit How to test a Map
Forget about JUnit assertEquals(), to test a Map, uses the more expressive IsMapContaining class from hamcrest-library.jar
Date: 2019-08-17 View: 1520
-
JUnit Assert if a property exists in a class
Includes hamcrest-library and test the class property and its value with hasProperty() :
Date: 2019-08-17 View: 1520