public void LoadFromStream() { using var memoryStream = new MemoryStream(); _mlSample.Dump(memoryStream); memoryStream.Seek(0, SeekOrigin.Begin); var mlTest = new MemoryList(1, memoryStream); Assert.AreEqual(_mlSample.Modified, mlTest.Modified); Assert.AreEqual(_mlSample.Locked, mlTest.Locked); for (var i = 0; i < MemoryList.Length; i++) { Assert.AreEqual(_mlSample[i], mlTest[i]); } }
public void WriteToStream() { using var memoryStream = new MemoryStream(); _mlEmpty.Dump(memoryStream); Assert.NotZero(memoryStream.Length); }