public void CloneTest() { var buffer = new NetworkBuffer(BIG_BUFFER_DATA.Length, BIG_BUFFER_DATA); var copy = buffer.Clone(); Assert.AreEqual <int>(buffer.Size, copy.Size, "Cloned buffer should have the same size."); Assert.AreEqual <int>(buffer.Received, copy.Received, "Cloned buffer should have the same received number of bytes."); buffer.Dispose(); (copy as NetworkBuffer).Dispose(); }