private static void AssertAfterCreate(byte[] expected, ZFrame msg) { Assert.AreEqual(expected.Length, msg.Length); Assert.AreEqual(msg.Length, msg.Position); msg.Seek(0, SeekOrigin.Begin); var bytes = msg.Read(); CollectionAssert.AreEqual(expected, bytes); }