You are on page 1of 2

Java Unit Testing with JUnit 5

JUnit 5 Assertions

Dinesh Varyani
https://www.hubberspot.com
Assertions in JUnit 5
▸ JUnit 5 assertions help us in
validating the expected output with
the actual output of a test case. Test Case
Compare with
the expected
▸ Assertions are static methods that Expected output Actual
Input
we call in our tests to verify Output Output
expected behavior.
▸ JUnit Jupiter assertions are
present in
org.junit.jupiter.Assertions class. System Under Test
▸ Assertions methods supports
features of Java 8 such as lambda
expressions, streams etc.

You might also like