Hamcrest
-
Core Java
Verify List Elements with Specific Properties Using Hamcrest
Hamcrest is a powerful framework used for writing matcher objects, which are helpful when writing tests in Java. One common…
Read More » -
Core Java
Hamcrest Collection hasItem() Example
In Java, it’s common to check whether a collection contains a specific element. This is a frequent task in testing…
Read More » -
Core Java
hasItems() vs. contains() vs. containsInAnyOrder() in Hamcrest
Hamcrest is a popular framework for writing matcher objects, allowing for more readable and flexible unit tests. Among its many…
Read More » -
Core Java
Check if a Variable Is Null Using Hamcrest
In unit testing, verifying that a variable is null is a common task. Hamcrest, a popular framework for writing matcher…
Read More » -
Core Java
Verifying DateTime and Date with Hamcrest
Since I started diving into automated testing and practicing TDD, verification of date values was pain. Luckily there is nice…
Read More » -
Core Java
Advanced Creation of Hamcrest Matchers
Intro Last time, I went over what a Hamcrest Matcher was, how it’s used, and how to make one. In…
Read More » -
Core Java
Redesigning Hamcrest
I’ve done a few posts on the Hamcrest library, and I really do enjoy using it, but there are a…
Read More » -
Enterprise Java
HOW-TO: Test dependencies in a Maven project (JUnit, Mockito, Hamcrest, AssertJ)
JUnit itself is not enough for most of today’s Java projects. You also need a mocking library, maybe something else.…
Read More » -
Core Java
Using Matchers in Tests
Gone are the days when we were forced to write way too many assertion lines in our testing code. There…
Read More »
- 1
- 2