Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 public void Write_throws_when_buffer_offset_equals_length()
 {
     ByteCountingNullStream target = new ByteCountingNullStream();
     byte[] buffer = new byte[100];
     target.Write(buffer, 100, 1);
 }
Ejemplo n.º 3
0
 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);
 }
Ejemplo n.º 4
0
 public void Write_throws_when_buffer_is_null()
 {
     ByteCountingNullStream target = new ByteCountingNullStream();
     target.Write(null, 0, 1);
 }