Class StaticExternalResourceProxy<T extends org.junit.rules.ExternalResource>

  • All Implemented Interfaces:
    org.junit.jupiter.api.extension.AfterAllCallback, org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.Extension

    public class StaticExternalResourceProxy<T extends org.junit.rules.ExternalResource>
    extends Object
    implements org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.AfterAllCallback
    A wrapper class for migrating JUnit 4 @ClassRule to JUnit 5.
    • Constructor Detail

      • StaticExternalResourceProxy

        public StaticExternalResourceProxy​(T resource)
    • Method Detail

      • get

        public T get()
      • beforeAll

        public void beforeAll​(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
                       throws Exception
        Specified by:
        beforeAll in interface org.junit.jupiter.api.extension.BeforeAllCallback
        Throws:
        Exception
      • afterAll

        public void afterAll​(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
                      throws Exception
        Specified by:
        afterAll in interface org.junit.jupiter.api.extension.AfterAllCallback
        Throws:
        Exception