Package org.apache.nifi.util
Class TestRunners
java.lang.Object
org.apache.nifi.util.TestRunners
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TestRunnernewTestRunner(Class<? extends org.apache.nifi.processor.Processor> processorClass) Returns aTestRunnerfor the givenProcessorclass.static TestRunnernewTestRunner(Class<? extends org.apache.nifi.processor.Processor> processorClass, String name) Returns aTestRunnerfor the givenProcessorclass.static TestRunnernewTestRunner(Class<? extends org.apache.nifi.processor.Processor> processorClass, String name, MockComponentLog logger) Returns aTestRunnerfor the givenProcessorclass.static TestRunnernewTestRunner(Class<? extends org.apache.nifi.processor.Processor> processorClass, MockComponentLog logger) Returns aTestRunnerfor the givenProcessorclass.static TestRunnernewTestRunner(org.apache.nifi.processor.Processor processor) Returns aTestRunnerfor the givenProcessor.static TestRunnernewTestRunner(org.apache.nifi.processor.Processor processor, String name) Returns aTestRunnerfor the givenProcessor.static TestRunnernewTestRunner(org.apache.nifi.processor.Processor processor, String name, org.apache.nifi.kerberos.KerberosContext kerberosContext) Returns aTestRunnerfor the givenProcessorandKerberosContext.static TestRunnernewTestRunner(org.apache.nifi.processor.Processor processor, String name, MockComponentLog logger) Returns aTestRunnerfor the givenProcessor.static TestRunnernewTestRunner(org.apache.nifi.processor.Processor processor, org.apache.nifi.kerberos.KerberosContext kerberosContext) Returns aTestRunnerfor the givenProcessorwhich uses the givenKerberosContext.static TestRunnernewTestRunner(org.apache.nifi.processor.Processor processor, MockComponentLog logger) Returns aTestRunnerfor the givenProcessor.
-
Constructor Details
-
TestRunners
public TestRunners()
-
-
Method Details
-
newTestRunner
Returns aTestRunnerfor the givenProcessor. The processor name available fromTestRunner.getProcessContext().getName()will have the default name ofprocessor.getClass().getName()- Parameters:
processor- theProcessorunder test- Returns:
- a
TestRunner
-
newTestRunner
public static TestRunner newTestRunner(org.apache.nifi.processor.Processor processor, org.apache.nifi.kerberos.KerberosContext kerberosContext) Returns aTestRunnerfor the givenProcessorwhich uses the givenKerberosContext.- Parameters:
processor- theProcessorunder testkerberosContext- theKerberosContextused during the test- Returns:
- a
TestRunner
-
newTestRunner
public static TestRunner newTestRunner(org.apache.nifi.processor.Processor processor, MockComponentLog logger) Returns aTestRunnerfor the givenProcessor. The processor name available fromTestRunner.getProcessContext().getName()will have the default name ofprocessor.getClass().getName()- Parameters:
processor- theProcessorunder testlogger- theComponentLogused for logging- Returns:
- a
TestRunner
-
newTestRunner
Returns aTestRunnerfor the givenProcessor. The processor name available fromTestRunner.getProcessContext().getName()will be the passed name.- Parameters:
processor- theProcessorunder testname- the name to give theProcessor- Returns:
- a
TestRunner
-
newTestRunner
public static TestRunner newTestRunner(org.apache.nifi.processor.Processor processor, String name, org.apache.nifi.kerberos.KerberosContext kerberosContext) Returns aTestRunnerfor the givenProcessorandKerberosContext.- Parameters:
processor- theProcessorunder testname- the name to give theProcessorkerberosContext- theKerberosContextused during the test- Returns:
- a
TestRunner
-
newTestRunner
public static TestRunner newTestRunner(org.apache.nifi.processor.Processor processor, String name, MockComponentLog logger) Returns aTestRunnerfor the givenProcessor. The processor name available fromTestRunner.getProcessContext().getName()will be the passed name.- Parameters:
processor- theProcessorunder testname- the name to give theProcessorlogger- theComponentLogused for logging- Returns:
- a
TestRunner
-
newTestRunner
public static TestRunner newTestRunner(Class<? extends org.apache.nifi.processor.Processor> processorClass) Returns aTestRunnerfor the givenProcessorclass. The processor name available fromTestRunner.getProcessContext().getName()will have the default name ofprocessor.getClass().getName()- Parameters:
processorClass- theProcessorclass- Returns:
- a
TestRunner
-
newTestRunner
public static TestRunner newTestRunner(Class<? extends org.apache.nifi.processor.Processor> processorClass, MockComponentLog logger) Returns aTestRunnerfor the givenProcessorclass. The processor name available fromTestRunner.getProcessContext().getName()will have the default name ofprocessor.getClass().getName()- Parameters:
processorClass- theProcessorclasslogger- theComponentLogused for logging- Returns:
- a
TestRunner
-
newTestRunner
public static TestRunner newTestRunner(Class<? extends org.apache.nifi.processor.Processor> processorClass, String name) Returns aTestRunnerfor the givenProcessorclass. The processor name available fromTestRunner.getProcessContext().getName()will have the default name ofprocessor.getClass().getName()- Parameters:
processorClass- theProcessorclassname- the name to give theProcessor- Returns:
- a
TestRunner
-
newTestRunner
public static TestRunner newTestRunner(Class<? extends org.apache.nifi.processor.Processor> processorClass, String name, MockComponentLog logger) Returns aTestRunnerfor the givenProcessorclass. The processor name available fromTestRunner.getProcessContext().getName()will have the default name ofprocessor.getClass().getName()- Parameters:
processorClass- theProcessorclassname- the name to give theProcessorlogger- theComponentLogused for logging- Returns:
- a
TestRunner
-