Package org.apache.nifi.util
Class TestRunners
java.lang.Object
org.apache.nifi.util.TestRunners
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic TestRunner
newTestRunner
(Class<? extends Processor> processorClass) Returns aTestRunner
for the givenProcessor
class.static TestRunner
newTestRunner
(Class<? extends Processor> processorClass, String name) Returns aTestRunner
for the givenProcessor
class.static TestRunner
newTestRunner
(Class<? extends Processor> processorClass, String name, MockComponentLog logger) Returns aTestRunner
for the givenProcessor
class.static TestRunner
newTestRunner
(Class<? extends Processor> processorClass, MockComponentLog logger) Returns aTestRunner
for the givenProcessor
class.static TestRunner
newTestRunner
(Processor processor) Returns aTestRunner
for the givenProcessor
.static TestRunner
newTestRunner
(Processor processor, String name) Returns aTestRunner
for the givenProcessor
.static TestRunner
newTestRunner
(Processor processor, String name, KerberosContext kerberosContext) Returns aTestRunner
for the givenProcessor
andKerberosContext
.static TestRunner
newTestRunner
(Processor processor, String name, MockComponentLog logger) Returns aTestRunner
for the givenProcessor
.static TestRunner
newTestRunner
(Processor processor, KerberosContext kerberosContext) Returns aTestRunner
for the givenProcessor
which uses the givenKerberosContext
.static TestRunner
newTestRunner
(Processor processor, MockComponentLog logger) Returns aTestRunner
for the givenProcessor
.
-
Constructor Details
-
TestRunners
public TestRunners()
-
-
Method Details
-
newTestRunner
Returns aTestRunner
for the givenProcessor
. The processor name available fromTestRunner.getProcessContext().getName()
will have the default name ofprocessor.getClass().getName()
- Parameters:
processor
- theProcessor
under test- Returns:
- a
TestRunner
-
newTestRunner
Returns aTestRunner
for the givenProcessor
which uses the givenKerberosContext
.- Parameters:
processor
- theProcessor
under testkerberosContext
- theKerberosContext
used during the test- Returns:
- a
TestRunner
-
newTestRunner
Returns aTestRunner
for the givenProcessor
. The processor name available fromTestRunner.getProcessContext().getName()
will have the default name ofprocessor.getClass().getName()
- Parameters:
processor
- theProcessor
under testlogger
- theComponentLog
used for logging- Returns:
- a
TestRunner
-
newTestRunner
Returns aTestRunner
for the givenProcessor
. The processor name available fromTestRunner.getProcessContext().getName()
will be the passed name.- Parameters:
processor
- theProcessor
under testname
- the name to give theProcessor
- Returns:
- a
TestRunner
-
newTestRunner
public static TestRunner newTestRunner(Processor processor, String name, KerberosContext kerberosContext) Returns aTestRunner
for the givenProcessor
andKerberosContext
.- Parameters:
processor
- theProcessor
under testname
- the name to give theProcessor
kerberosContext
- theKerberosContext
used during the test- Returns:
- a
TestRunner
-
newTestRunner
Returns aTestRunner
for the givenProcessor
. The processor name available fromTestRunner.getProcessContext().getName()
will be the passed name.- Parameters:
processor
- theProcessor
under testname
- the name to give theProcessor
logger
- theComponentLog
used for logging- Returns:
- a
TestRunner
-
newTestRunner
Returns aTestRunner
for the givenProcessor
class. The processor name available fromTestRunner.getProcessContext().getName()
will have the default name ofprocessor.getClass().getName()
- Parameters:
processorClass
- theProcessor
class- Returns:
- a
TestRunner
-
newTestRunner
public static TestRunner newTestRunner(Class<? extends Processor> processorClass, MockComponentLog logger) Returns aTestRunner
for the givenProcessor
class. The processor name available fromTestRunner.getProcessContext().getName()
will have the default name ofprocessor.getClass().getName()
- Parameters:
processorClass
- theProcessor
classlogger
- theComponentLog
used for logging- Returns:
- a
TestRunner
-
newTestRunner
Returns aTestRunner
for the givenProcessor
class. The processor name available fromTestRunner.getProcessContext().getName()
will have the default name ofprocessor.getClass().getName()
- Parameters:
processorClass
- theProcessor
classname
- the name to give theProcessor
- Returns:
- a
TestRunner
-
newTestRunner
public static TestRunner newTestRunner(Class<? extends Processor> processorClass, String name, MockComponentLog logger) Returns aTestRunner
for the givenProcessor
class. The processor name available fromTestRunner.getProcessContext().getName()
will have the default name ofprocessor.getClass().getName()
- Parameters:
processorClass
- theProcessor
classname
- the name to give theProcessor
logger
- theComponentLog
used for logging- Returns:
- a
TestRunner
-