public void Read_Zero_Throws_At_End() { byte[] inbuf = { 0, 1, 2, 3 }; byte[] outbuf = new byte[1]; using (var s = new OtpInputStream(inbuf)) { s.ReadN(outbuf); s.ReadN(outbuf); s.ReadN(outbuf); s.ReadN(outbuf); Assert.Throws(typeof(Exception), () => s.ReadN(outbuf, 0, 0)); } }