Class LazyLauncher

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.junit.platform.launcher.Launcher

    class LazyLauncher
    extends java.lang.Object
    implements org.junit.platform.launcher.Launcher, java.lang.AutoCloseable
    Launcher proxy which delays the most possible the initialization of the real JUnit Launcher in order to avoid stream/stdout corruption due to early logging.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.junit.platform.launcher.Launcher launcher  
      private java.lang.AutoCloseable launcherSession  
    • Constructor Summary

      Constructors 
      Constructor Description
      LazyLauncher()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      org.junit.platform.launcher.TestPlan discover​(org.junit.platform.launcher.LauncherDiscoveryRequest launcherDiscoveryRequest)  
      void execute​(org.junit.platform.launcher.LauncherDiscoveryRequest launcherDiscoveryRequest, org.junit.platform.launcher.TestExecutionListener... testExecutionListeners)  
      void execute​(org.junit.platform.launcher.TestPlan testPlan, org.junit.platform.launcher.TestExecutionListener... listeners)  
      private org.junit.platform.launcher.Launcher launcher()  
      void registerLauncherDiscoveryListeners​(org.junit.platform.launcher.LauncherDiscoveryListener... listeners)  
      void registerTestExecutionListeners​(org.junit.platform.launcher.TestExecutionListener... testExecutionListeners)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • launcherSession

        private java.lang.AutoCloseable launcherSession
      • launcher

        private org.junit.platform.launcher.Launcher launcher
    • Constructor Detail

      • LazyLauncher

        LazyLauncher()
    • Method Detail

      • registerLauncherDiscoveryListeners

        public void registerLauncherDiscoveryListeners​(org.junit.platform.launcher.LauncherDiscoveryListener... listeners)
        Specified by:
        registerLauncherDiscoveryListeners in interface org.junit.platform.launcher.Launcher
      • registerTestExecutionListeners

        public void registerTestExecutionListeners​(org.junit.platform.launcher.TestExecutionListener... testExecutionListeners)
        Specified by:
        registerTestExecutionListeners in interface org.junit.platform.launcher.Launcher
      • discover

        public org.junit.platform.launcher.TestPlan discover​(org.junit.platform.launcher.LauncherDiscoveryRequest launcherDiscoveryRequest)
        Specified by:
        discover in interface org.junit.platform.launcher.Launcher
      • execute

        public void execute​(org.junit.platform.launcher.LauncherDiscoveryRequest launcherDiscoveryRequest,
                            org.junit.platform.launcher.TestExecutionListener... testExecutionListeners)
        Specified by:
        execute in interface org.junit.platform.launcher.Launcher
      • execute

        public void execute​(org.junit.platform.launcher.TestPlan testPlan,
                            org.junit.platform.launcher.TestExecutionListener... listeners)
        Specified by:
        execute in interface org.junit.platform.launcher.Launcher
      • launcher

        private org.junit.platform.launcher.Launcher launcher()
      • close

        public void close()
                   throws java.lang.Exception
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.lang.Exception