com.ibm.streams.flow.javaprimitives
Class JavaOperatorTester
- java.lang.Object
-
- com.ibm.streams.flow.javaprimitives.JavaOperatorTester
-
- All Implemented Interfaces:
- ExecutableGraphFactory<JavaTestableGraph>
public class JavaOperatorTester extends java.lang.Object implements ExecutableGraphFactory<JavaTestableGraph>
Utility methods for testingOperatorGraph
instances that contain implementations ofOperator
.- Since:
- InfoSphere® Streams Version 3.1
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
IBM_COPYRIGHT
-
Constructor Summary
Constructors Constructor and Description JavaOperatorTester()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description JavaTestableGraph
executable(OperatorGraph operatorGraph)
Create aJavaTestableGraph
for a graph of Java primitive operators.<T extends Operator>
OperatorInvocation<T>singleOp(java.lang.Class<T> opClass)
Create anOperatorInvocation
for a single operator.<T extends Operator>
OperatorInvocation<T>singleOp(java.lang.String name, java.lang.Class<T> opClass)
JavaTestableGraph
tester(OperatorInvocation<? extends Operator> invocation)
Create aJavaTestableGraph
that contains the operator invocation that is declared byinvocation
.
-
-
-
Field Detail
-
IBM_COPYRIGHT
public static final java.lang.String IBM_COPYRIGHT
- See Also:
- Constant Field Values
-
-
Method Detail
-
executable
public JavaTestableGraph executable(OperatorGraph operatorGraph) throws java.lang.Exception
Create aJavaTestableGraph
for a graph of Java primitive operators.- Specified by:
executable
in interfaceExecutableGraphFactory<JavaTestableGraph>
- Parameters:
operatorGraph
- The declared operator graph.- Returns:
testable graph
foroperatorGraph
.- Throws:
java.lang.Exception
-
singleOp
public <T extends Operator> OperatorInvocation<T> singleOp(java.lang.Class<T> opClass)
Create anOperatorInvocation
for a single operator. Allows unit testing of a class that represents a Java primitive.- Type Parameters:
T
- Type of the operator class.- Parameters:
opClass
- Operator class to be tested.- Returns:
- OperatorInvocation for a Java primitive that is represented by
opClass
-
singleOp
public <T extends Operator> OperatorInvocation<T> singleOp(java.lang.String name, java.lang.Class<T> opClass)
-
tester
public JavaTestableGraph tester(OperatorInvocation<? extends Operator> invocation) throws java.lang.Exception
Create aJavaTestableGraph
that contains the operator invocation that is declared byinvocation
.- Parameters:
invocation
- Invocation of operator- Returns:
testable graph
forinvocation
.- Throws:
java.lang.Exception
- See Also:
singleOp(Class)
-
-