Tag: unittests

  • Log Message Validation with JUnit 5

    Log Message Validation with JUnit 5

    Introduction In your unittests it is important to check whether the code under test has been executed correctly. Sometimes, all you can check is log statements. In this guide, we will leverage the JUnit 5 Extension Model to intercept and verify logging. We will asume Logback is used in the application. Capture┬álogging┬ástatements The first thing…

  • Javadoc

    In our current project there is a guideline that all of the public API must have Javadoc. I disagree with this guideline. Our project does not have a public API, since we’re the only team that works on this project and no other team is allowed to use the codebase. Public classes and methods are…