Package akka.stream.testkit
Class TestSinkStage<T,M>
- java.lang.Object
-
- akka.stream.stage.GraphStageWithMaterializedValue<SinkShape<T>,M>
-
- akka.stream.testkit.TestSinkStage<T,M>
-
public class TestSinkStage<T,M> extends GraphStageWithMaterializedValue<SinkShape<T>,M>
Creates a sink out of thestageUnderTest
that will inform theprobe
of operator events and callbacks by sending it the various messages found underGraphStageMessages
.This allows for creation of a "normal" stream ending with the sink while still being able to assert internal events.
-
-
Constructor Summary
Constructors Constructor Description TestSinkStage(GraphStageWithMaterializedValue<SinkShape<T>,M> stageUnderTest, TestProbe probe)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T,M>
Sink<T,M>apply(GraphStageWithMaterializedValue<SinkShape<T>,M> stageUnderTest, TestProbe probe)
scala.Tuple2<GraphStageLogic,M>
createLogicAndMaterializedValue(Attributes inheritedAttributes)
Inlet<T>
in()
SinkShape<T>
shape()
The shape of a graph is all that is externally visible: its inlets and outlets.-
Methods inherited from class akka.stream.stage.GraphStageWithMaterializedValue
createLogicAndMaterializedValue, initialAttributes, traversalBuilder, withAttributes
-
-
-
-
Constructor Detail
-
TestSinkStage
public TestSinkStage(GraphStageWithMaterializedValue<SinkShape<T>,M> stageUnderTest, TestProbe probe)
-
-
Method Detail
-
apply
public static <T,M> Sink<T,M> apply(GraphStageWithMaterializedValue<SinkShape<T>,M> stageUnderTest, TestProbe probe)
-
shape
public SinkShape<T> shape()
Description copied from interface:Graph
The shape of a graph is all that is externally visible: its inlets and outlets.- Returns:
- (undocumented)
-
createLogicAndMaterializedValue
public scala.Tuple2<GraphStageLogic,M> createLogicAndMaterializedValue(Attributes inheritedAttributes)
- Specified by:
createLogicAndMaterializedValue
in classGraphStageWithMaterializedValue<SinkShape<T>,M>
-
-