concept TestReporterParameterResolver in category java

appears as: TestReporterParameterResolver
JUnit in Action

This is an excerpt from Manning's book JUnit in Action.

If a constructor or method parameter is of type TestReporter, TestReporterParameterResolver supplies an instance of this type. TestReporter is a functional interface and therefore can be used as the assignment target for a lambda expression or method reference. TestReporter has a single publishEntry abstract method and several overloaded publishEntry default methods. Parameters of type TestReporter can be injected into methods of test classes annotated with @BeforeEach, @AfterEach, and @Test. TestReporter can also be used to provide additional information about the test that is run. Here’s how to use a TestReporter parameter as an argument of @Test annotated methods.