Hamcrest: Core Matchers & assertThat. Hamcrest is a library of composable matcher objects for writing expressive, readable test assertions -- it doesn't run tests itself, it plugs into assertThat() calls from JUnit, Test…
ReadHamcrest: Collection Matchers & Custom Matchers. Collection Matchers. @Test void collectionMatchers() { List<String> fruits = List.of("apple", "banana", "cherry"); assertThat(fruits, hasSize(3)); assertThat(fruits, hasSi…
ReadSave this stack to your personal DevRecall — add your own notes, track what you're learning, and share what you know with the community.
Get started — free forever