public void Then(StreamTestBase tbase)
 {
     tbase.Bytes.Should().NotBeEmpty();
 }
 public void When(StreamTestBase tbase)
 {
     tbase.Stream.Write(tbase.Payload, 0, tbase.Payload.Length);
 }
 public void When(StreamTestBase tbase)
 {
     tbase.Bytes = new byte[10];
     tbase.Stream.Read(tbase.Bytes, 0, 10);
 }
 public void Given(StreamTestBase tbase)
 {
     tbase.Payload = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
 }
 public void Given(StreamTestBase tbase)
 {
     tbase.Stream = new NetworkStream(new Socket(SocketType.Stream, ProtocolType.Tcp));
 }
 public void Given(StreamTestBase tbase)
 {
     tbase.Stream = new FileStream("", FileMode.Create);
 }