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