...
This page describes how we can write our first test class with JUnit 5. After we have finished this blog postpage, we:
- Can create test classes with JUnit 5.
- Know how we can use setup and teardown methods.
- Understand how we can write simple test methods with JUnit 5.
...
Info |
---|
The tutorial repository can be found here: https://gitlab.eufus.psnc.eupl/bpogodzinskiach/ach-tutorials/-/tree/TDD-java/TDD-java/Overview |
Setup and Teardown methods
...
This tutorial has taught us four three things:
...
- Setup and teardown methods must not be
private
and they must not return anything. - A test method is a method that isn't
private
and doesn't return anything. - We could specify the display name of a test class and a test method because this allows us to replace technical names with sentences that make sense.