public void WriteAndReadByteViaMemoryFile() { var file = new Torch.IO.MemoryFile("rwb"); Assert.IsNotNull(file); Assert.IsTrue(file.CanWrite); file.WriteByte(13); file.WriteByte(17); file.Seek(0); var rd = file.ReadByte(); Assert.AreEqual(13, rd); rd = file.ReadByte(); Assert.AreEqual(17, rd); file.Close(); Assert.IsFalse(file.IsOpen); }