Hamcrest File Matchers 1. Overview In this tutorial, we’ll discuss Hamcrest File Matchers. We discussed Hamcrest Matchers in general before in the previous Testing with Hamcrest article. In the next sections, we’ll focus only File Matchers. 2. Maven Configuration First, we need to add the following dependency to our pom.xml:… Continue Reading hamcrest-file-matchers

Hamcrest Text Matchers 1. Overview In this tutorial, we’ll explore Hamcrest Text Matchers. We discussed Hamcrest Matchers in general before in testing with Hamcrest, in this tutorial we’ll focus on Text Matchers only. 2. Maven Configuration First, we need to add the following dependency to our pom.xml: <dependency> <groupId>org.hamcrest</groupId> <artifactId>java-hamcrest</artifactId>… Continue Reading hamcrest-text-matchers

Hamcrest Collections Cookbook 1. Introduction This cookbook illustrates how to make use of Hamcrest matchers to work with and test collections. The format of the cookbook is example focused and practical – no extraneous details and explanations necessary. First, let’s do a quick static import to cover most of the… Continue Reading hamcrest-collections-arrays