コード例 #1
0
 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);
 }
コード例 #2
0
 public void Write_throws_when_buffer_offset_equals_length()
 {
     var target = new ByteCountingStream();
     var buffer = new byte[100];
     target.Write(buffer, 100, 1);
 }
コード例 #3
0
 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);
 }
コード例 #4
0
 public void Write_throws_when_buffer_is_null()
 {
     var target = new ByteCountingStream();
     target.Write(null, 0, 1);
 }