Class AbstractPdoTest.SuiteExtension

java.lang.Object
org.tentackle.pdo.junit.AbstractPdoTest.SuiteExtension
All Implemented Interfaces:
org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.Extension, org.junit.jupiter.api.extension.TestExecutionExceptionHandler
Enclosing class:
AbstractPdoTest

public static class AbstractPdoTest.SuiteExtension extends Object implements org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.TestExecutionExceptionHandler
Opens the session once for all test classes and closes it when the test run ends.
Also marks the rolled back statements to be logged if a test method fails.
Author:
harald
  • Constructor Details

    • SuiteExtension

      public SuiteExtension()
      Creates the extension.
  • Method Details

    • beforeAll

      public void beforeAll(org.junit.jupiter.api.extension.ExtensionContext context)
      Specified by:
      beforeAll in interface org.junit.jupiter.api.extension.BeforeAllCallback
    • handleTestExecutionException

      public void handleTestExecutionException(org.junit.jupiter.api.extension.ExtensionContext context, Throwable throwable) throws Throwable
      Specified by:
      handleTestExecutionException in interface org.junit.jupiter.api.extension.TestExecutionExceptionHandler
      Throws:
      Throwable