JUnit Assertions

Assertions and asserting them

Introduction

  • How to use JUnit 5's built in assertion methods.
  • How to use the AssertJ library for better assertions.
  • How to use @DisplayName to change test method names.
  • How to assert JSON: JSON Unit.
  • How to assert XML: XML Unit.