public class MockOutputCollector extends java.lang.Object implements OutputCollector
RamaOperation
outside the context of a module or Block
. Emits from the operation
are captured in internal state in this object and can be retrieved for performing
assertions.Modifier and Type | Class and Description |
---|---|
static class |
MockOutputCollector.CapturedEmit
Information about a captured emit
|
Constructor and Description |
---|
MockOutputCollector() |
Modifier and Type | Method and Description |
---|---|
void |
emit(java.lang.Object... output)
Emit any number of fields to the default output stream.
|
void |
emitStream(java.lang.String streamName,
java.lang.Object... output)
Emit any number of fields to a named output stream.
|
java.util.List<MockOutputCollector.CapturedEmit> |
getEmits()
Retrieve captured emits in the order in which they happened
|
java.util.Map<java.lang.String,java.util.List<java.util.List<java.lang.Object>>> |
getEmitsByStream()
Retrieve captured emits split by stream name.
|
public void emit(java.lang.Object... output)
OutputCollector
Block.Out.out(String...)
emit
in interface OutputCollector
output
- Output fieldspublic void emitStream(java.lang.String streamName, java.lang.Object... output)
OutputCollector
Block.MultiOutImpl.outStream(String, String, String...)
emitStream
in interface OutputCollector
streamName
- Name of output streamoutput
- Output fieldspublic java.util.List<MockOutputCollector.CapturedEmit> getEmits()
public java.util.Map<java.lang.String,java.util.List<java.util.List<java.lang.Object>>> getEmitsByStream()
OutputCollector.emit(java.lang.Object...)
will be null
.