~/talk

AssertJ like a pro

TalkinFrenchat Voxxed Days Luxembourg 2024 · 2024-06-20..06-21· [testing]
links:none on file
slides:none on file

AssertJ replaces fragile JUnit-style asserts with concrete AssertJ features: singleElement to unwrap one-item collections, isCloseTo for tolerant temporal comparisons, and soft assertions to run multiple checks without aborting. It also shows shrinking validation-heavy tests by extracting reusable Condition objects and by creating custom assertions that extend AbstractAssert with a static factory method so tests read as domain-specific fluent checks; the benefit is readability and maintainability rather than runtime speedup.

AI-written summary · about

  1. 0:00Introduction
  2. 1:24AssertJ library
  3. 2:49Collection assertions
  4. 4:33Multiple assertions
  5. 5:56Temporal data assertions
  6. 7:01Business rule validation
  7. 8:47Refactoring with conditions
  8. 10:32Custom assertions
  9. 12:36Going further with AssertJ
  10. 13:59Conclusion
  11. 14:21Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.