public void CheckReadWriteByteReturnsSameValue(byte value) { using (var baseStream = new MemoryStream()) { var constructWriter = new ConstructWriterStream(baseStream); constructWriter.WriteByte(value); baseStream.Seek(0, SeekOrigin.Begin); var constructReader = new ConstructReaderStream(baseStream); var result = constructReader.ReadByte(); Assert.AreEqual(value, result); } }
public void ReadByteIsCorrectValue(byte value) { var constructStream = new ConstructReaderStream(DataStream.Create(value)); Assert.AreEqual(value, constructStream.ReadByte()); }