O'Reilly logo

Mastering Software Testing with JUnit 5 by Boni García

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Third-party extensions

In the real world, extensions typically implement several of the previously explained extension points. For example, SpringExtension (explained in detail in chapter 5, Integration of JUnit 5 with external frameworks) implements the extensions points BeforeAllCallback, TestInstancePostProcessor, ParameterResolver, among others. The following snippet provides the structure of SpringExtension:

package org.springframework.test.context.junit.jupiter;import org.junit.jupiter.api.extension.*;public class SpringExtension implements BeforeAllCallback,        AfterAllCallback,   TestInstancePostProcessor, BeforeEachCallback, AfterEachCallback,   BeforeTestExecutionCallback, AfterTestExecutionCallback,   ParameterResolver {   @Override   public ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required