A slightly different way to do Boolean assertions in JUnit

Photo by Debby Hudson on Unsplash

In my opinion, the most useful assertion in JUnit is . Once in a while, though, comes in handy. Its single parameter form takes a Boolean, its 2-parameter form takes an assertion message and a Boolean (in JUnit 5, the Boolean goes first, before the assertion message).

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alonso Del Arte

is a Java and Scala developer from Detroit, Michigan. AWS Cloud Practitioner Foundational certified