Akka.Streams.Tests.Dsl.FlowWatchTerminationSpec.A_WatchTermination_must_fail_the_future_when_stream_is_failed C# (CSharp) Method

A_WatchTermination_must_fail_the_future_when_stream_is_failed() private method

        public void A_WatchTermination_must_fail_the_future_when_stream_is_failed()
        {
            this.AssertAllStagesStopped(() =>
            {
                var ex = new SystemException("Stream failed.");
                var t = this.SourceProbe<int>().WatchTermination(Keep.Both).To(Sink.Ignore<int>()).Run(Materializer);
                var p = t.Item1;
                var future = t.Item2;
                p.SendNext(1);
                p.SendError(ex);
                future.Invoking(f => f.Wait()).ShouldThrow<SystemException>().WithMessage("Stream failed.");
            }, Materializer);
        }