public void TestRemoteErrorSerialization_MissingErrorCodeElement()
        {
            var error = new RemoteError();
            error.ComponentName = "component";

            var xml = error.Serialize();
            xml.Element(XName.Get("ErrorCode", xml.Name.NamespaceName)).Remove();

            var roundtrip = new RemoteError();
            Assert.IsFalse(roundtrip.Validate(xml));
        }
        public void TestRemoteErrorSerialization_NoCallId()
        {
            var error = new RemoteError();
            error.ComponentName = "component";

            var xml = error.Serialize();

            var roundtrip = new RemoteError();
            Assert.IsTrue(roundtrip.Validate(xml));
            roundtrip.Deserialize(xml);

            Assert.IsNotNull(roundtrip);
            Assert.AreEqual<Guid>(error.CallId, roundtrip.CallId);
            Assert.AreEqual<string>(error.ComponentName, roundtrip.ComponentName);
            Assert.AreEqual<RemoteErrorCode>(error.ErrorCode, roundtrip.ErrorCode);
        }