public void Write_accepts_last_byte_of_buffer()
 {
     ByteCountingNullStream target = new ByteCountingNullStream();
     byte[] buffer = new byte[100];
     target.Write(buffer, 99, 1);
     Assert.AreEqual(1, target.Length);
 }
 public void Write_throws_when_buffer_offset_equals_length()
 {
     ByteCountingNullStream target = new ByteCountingNullStream();
     byte[] buffer = new byte[100];
     target.Write(buffer, 100, 1);
 }
 public void Write_throws_when_buffer_offset_and_count_exceed_length()
 {
     ByteCountingNullStream target = new ByteCountingNullStream();
     byte[] buffer = new byte[100];
     target.Write(buffer, 50, 51);
 }
 public void Write_throws_when_buffer_is_null()
 {
     ByteCountingNullStream target = new ByteCountingNullStream();
     target.Write(null, 0, 1);
 }