Hamcrest Flashcards
Hamcrest
a framework that comes with a library of useful matchers for writing match rules using matcher objects.
The matchers are most commonly used for:
Writing test assertions
Data validation
Filtering
matcher contains
Matches if the examined object contains the specified value
matcher empty
Matches if the examined object is empty
matcher equalTo
Matches if the examined object is logically equal to the specified value
matcher greaterThan
Matches if the examined object is greater than the specified value
matcher hasEntry
Matches if the examined Map has specified (key,value) entry
matcher isEmptyString
Matches if the examined object is an empty string
matcher startsWith
Matches if the examined object starts with a specific value
matcher instanceOf
Matches if the examined object is an instance of a specific object type
matcher notNullValue
Matches if the examined object does not have a null value