=str #17089 stream testkit

This commit is contained in:
Martynas Mickevičius 2015-04-24 11:45:03 +03:00
parent 7b4a640147
commit 8e2cc3e70f
96 changed files with 1411 additions and 1131 deletions

View file

@ -0,0 +1,25 @@
.. _stream-testkit-scala:
###############
Testing streams
###############
Akka Streams comes with an :mod:`akka-stream-testkit` module that provides tools which can be used for controlling and asserting various parts of the stream pipeline.
Probe Sink
==========
Using probe as a `Sink` allows manual control over demand and assertions over elements coming downstream. Streams testkit provides a sink that materializes to a :class:`TestSubscriber.Probe`.
.. includecode:: code/docs/stream/StreamTestKitDocSpec.scala#test-sink-probe
Probe Source
============
A source that materializes to :class:`TestPublisher.Probe` can be used for asserting demand or controlling when stream is completed or ended with an error.
.. includecode:: code/docs/stream/StreamTestKitDocSpec.scala#test-source-probe
*TODO*
List by example various operations on probes. Using probes without a sink.