Interface ExternalResource

All Superinterfaces:
org.junit.rules.TestRule

public interface ExternalResource extends org.junit.rules.TestRule
Modified version of the jUnit ExternalResource.

This version is an interface instead of an abstract class and allows resources to differentiate between successful and failed tests in their After methods.

  • Method Summary

    Modifier and Type
    Method
    Description
    default void
     
    void
     
    default org.junit.runners.model.Statement
    apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
     
    void
     
  • Method Details

    • before

      void before() throws Exception
      Throws:
      Exception
    • afterTestSuccess

      void afterTestSuccess()
    • afterTestFailure

      default void afterTestFailure()
    • apply

      default org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
      Specified by:
      apply in interface org.junit.rules.TestRule