Class VerifierSupport

java.lang.Object
org.junit.jupiter.migrationsupport.rules.VerifierSupport
All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterEachCallback, org.junit.jupiter.api.extension.Extension

@API(status=STABLE, since="5.7") public class VerifierSupport extends Object implements org.junit.jupiter.api.extension.AfterEachCallback
This Extension provides native support for subclasses of the Verifier rule from JUnit 4.

@Rule-annotated fields as well as methods are supported.

By using this class-level extension on a test class such Verifier implementations in legacy code bases can be left unchanged including the JUnit 4 rule import statements.

However, if you intend to develop a new extension for JUnit 5 please use the new extension model of JUnit Jupiter instead of the rule-based model of JUnit 4.

Since:
5.0
See Also:
  • Verifier
  • TestRule
  • Rule
  • Field Details

  • Constructor Details

    • VerifierSupport

      public VerifierSupport()
  • Method Details

    • afterEach

      public void afterEach(org.junit.jupiter.api.extension.ExtensionContext context) throws Exception
      Specified by:
      afterEach in interface org.junit.jupiter.api.extension.AfterEachCallback
      Throws:
      Exception