Class ClassLoaderTestSupport

java.lang.Object
net.officefloor.frame.test.ClassLoaderTestSupport
All Implemented Interfaces:
TestSupport

public class ClassLoaderTestSupport extends Object implements TestSupport
Author:
Daniel Sagenschneider
  • Field Details

  • Constructor Details

    • ClassLoaderTestSupport

      public ClassLoaderTestSupport(FileTestSupport fileTestSupport)
      Initialise.
      Parameters:
      fileTestSupport - FileTestSupport.
    • ClassLoaderTestSupport

      public ClassLoaderTestSupport()
      Default constructor.
  • Method Details

    • init

      public void init(org.junit.jupiter.api.extension.ExtensionContext context) throws Exception
      Description copied from interface: TestSupport
      Intialise.
      Specified by:
      init in interface TestSupport
      Parameters:
      context - ExtensionContext.
      Throws:
      Exception - If fails to init.
    • createNewClassLoader

      public ClassLoader createNewClassLoader()

      Creates a new ClassLoader from current process's java class path.

      Class instances loaded via this ClassLoader will be different to the current ClassLoader. This is to allow testing multiple ClassLoader environments (such as Eclipse plug-ins).

      Returns:
      New ClassLoader.