public void CheckSerialization() { using (MemoryStream ms = new MemoryStream()) { var inMessage = testMessage.ToExpectedObject(); IpcStream ipcStream = new IpcStream(ms, new List <Type>()); ipcStream.WriteMessage(testMessage); ms.Seek(0, SeekOrigin.Begin); IpcMessage returnMessage = ipcStream.ReadMessage(); inMessage.ShouldEqual(returnMessage); } }