Simplicity is the ultimate sophistication.
- Leonardo da Vinci
- Leonardo da Vinci
So far, we have discovered the basics of Jupiter, the brand-new programming model provided by the JUnit 5 framework. Moreover, Jupiter provides a rich range of possibilities which allows to create different types of test cases. In this chapter, we review these advanced features. To that aim, this chapter is structured as follows:
- Dependency injection: This section first takes a look at dependency injection for constructors and methods in test classes. Then, it reviews the three parameter resolvers provided out of the box in Jupiter. These resolvers allow to inject objects of TestInfo, RepetitionInfo, and TestReporter inside tests.
- Dynamic tests: This section discusses how dynamic tests are implemented in JUnit 5, using the methods dynamicTest and stream.
- Test interfaces...