Class ExpectedExceptionExtension

java.lang.Object
org.hibernate.testing.orm.junit.ExpectedExceptionExtension
All Implemented Interfaces:
org.junit.jupiter.api.extension.Extension, org.junit.jupiter.api.extension.TestExecutionExceptionHandler

public class ExpectedExceptionExtension extends Object implements org.junit.jupiter.api.extension.TestExecutionExceptionHandler
TestExecutionExceptionHandler used in conjunction with ExpectedException to support annotating tests with a specific exception that indicates a success (we are expecting that exception in that tested condition).
See Also:
  • Constructor Details

    • ExpectedExceptionExtension

      public ExpectedExceptionExtension()
  • Method Details

    • 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