Akka.Streams.Tests.IO.InputStreamSinkSpec.InputStreamSink_should_throw_error_when_reactive_stream_is_closed C# (CSharp) Method

InputStreamSink_should_throw_error_when_reactive_stream_is_closed() private method

        public void InputStreamSink_should_throw_error_when_reactive_stream_is_closed()
        {
            this.AssertAllStagesStopped(() =>
            {
                var t = this.SourceProbe<ByteString>()
                        .ToMaterialized(StreamConverters.AsInputStream(), Keep.Both)
                        .Run(_materializer);
                var probe = t.Item1;
                var inputStream = t.Item2;

                probe.SendNext(_byteString);
                inputStream.Close();
                probe.ExpectCancellation();

                Action block = () => inputStream.Read(new byte[1], 0, 1);
                block.ShouldThrow<IOException>();
            }, _materializer);
        }