Class TestRunners

java.lang.Object
org.apache.nifi.util.TestRunners

public class TestRunners extends Object
  • Constructor Details

    • TestRunners

      public TestRunners()
  • Method Details

    • newTestRunner

      public static TestRunner newTestRunner(Processor processor)
      Returns a TestRunner for the given Processor. The processor name available from TestRunner.getProcessContext().getName() will have the default name of processor.getClass().getName()
      Parameters:
      processor - the Processor under test
      Returns:
      a TestRunner
    • newTestRunner

      public static TestRunner newTestRunner(Processor processor, KerberosContext kerberosContext)
      Returns a TestRunner for the given Processor which uses the given KerberosContext.
      Parameters:
      processor - the Processor under test
      kerberosContext - the KerberosContext used during the test
      Returns:
      a TestRunner
    • newTestRunner

      public static TestRunner newTestRunner(Processor processor, MockComponentLog logger)
      Returns a TestRunner for the given Processor. The processor name available from TestRunner.getProcessContext().getName() will have the default name of processor.getClass().getName()
      Parameters:
      processor - the Processor under test
      logger - the ComponentLog used for logging
      Returns:
      a TestRunner
    • newTestRunner

      public static TestRunner newTestRunner(Processor processor, String name)
      Returns a TestRunner for the given Processor. The processor name available from TestRunner.getProcessContext().getName() will be the passed name.
      Parameters:
      processor - the Processor under test
      name - the name to give the Processor
      Returns:
      a TestRunner
    • newTestRunner

      public static TestRunner newTestRunner(Processor processor, String name, KerberosContext kerberosContext)
      Returns a TestRunner for the given Processor and KerberosContext.
      Parameters:
      processor - the Processor under test
      name - the name to give the Processor
      kerberosContext - the KerberosContext used during the test
      Returns:
      a TestRunner
    • newTestRunner

      public static TestRunner newTestRunner(Processor processor, String name, MockComponentLog logger)
      Returns a TestRunner for the given Processor. The processor name available from TestRunner.getProcessContext().getName() will be the passed name.
      Parameters:
      processor - the Processor under test
      name - the name to give the Processor
      logger - the ComponentLog used for logging
      Returns:
      a TestRunner
    • newTestRunner

      public static TestRunner newTestRunner(Class<? extends Processor> processorClass)
      Returns a TestRunner for the given Processor class. The processor name available from TestRunner.getProcessContext().getName() will have the default name of processor.getClass().getName()
      Parameters:
      processorClass - the Processor class
      Returns:
      a TestRunner
    • newTestRunner

      public static TestRunner newTestRunner(Class<? extends Processor> processorClass, MockComponentLog logger)
      Returns a TestRunner for the given Processor class. The processor name available from TestRunner.getProcessContext().getName() will have the default name of processor.getClass().getName()
      Parameters:
      processorClass - the Processor class
      logger - the ComponentLog used for logging
      Returns:
      a TestRunner
    • newTestRunner

      public static TestRunner newTestRunner(Class<? extends Processor> processorClass, String name)
      Returns a TestRunner for the given Processor class. The processor name available from TestRunner.getProcessContext().getName() will have the default name of processor.getClass().getName()
      Parameters:
      processorClass - the Processor class
      name - the name to give the Processor
      Returns:
      a TestRunner
    • newTestRunner

      public static TestRunner newTestRunner(Class<? extends Processor> processorClass, String name, MockComponentLog logger)
      Returns a TestRunner for the given Processor class. The processor name available from TestRunner.getProcessContext().getName() will have the default name of processor.getClass().getName()
      Parameters:
      processorClass - the Processor class
      name - the name to give the Processor
      logger - the ComponentLog used for logging
      Returns:
      a TestRunner