public void InputStreamSink_should_throw_exception_when_call_read_With_wrong_parameters()
{
this.AssertAllStagesStopped(() =>
{
var inputStream = Source.Single(_byteString).RunWith(StreamConverters.AsInputStream(), _materializer);
var buf = new byte[3];
Action(() => inputStream.Read(buf, -1, 2)).ShouldThrow<ArgumentException>();
Action(() => inputStream.Read(buf, 0, 5)).ShouldThrow<ArgumentException>();
Action(() => inputStream.Read(new byte[0], 0, 1)).ShouldThrow<ArgumentException>();
Action(() => inputStream.Read(buf, 0, 0)).ShouldThrow<ArgumentException>();
}, _materializer);
}