public void CanConvertErrorResponseXml()
        {
            //Arrange
            XNamespace xsi = "http://www.w3.org/2001/XMLSchema-instance";
            var        xml = new XElement("BatchResponse",
                                          new XAttribute("version", "5.1.16 build 116 (2010/05/27 14-36)"),
                                          new XAttribute(XNamespace.Xmlns + "xsi", xsi),
                                          new XAttribute(xsi + "noNamespaceSchemaLocation", "adsml.xsd"),
                                          new XElement("ErrorResponse",
                                                       new XAttribute("id", "1"),
                                                       new XAttribute("type", "malformedRequest"),
                                                       new XAttribute("description", "foo"),
                                                       new XElement("Message", "Foo error")));

            var erc = new ErrorResponseConverter();

            //Act
            ErrorResponse errorResponse = erc.Convert(xml).Single();

            //Assert
            Assert.That(errorResponse, Is.Not.Null);
            Assert.That(errorResponse.Description, Is.EqualTo("foo"));
            Assert.That(errorResponse.ErrorId, Is.EqualTo("1"));
            Assert.That(errorResponse.ErrorType, Is.EqualTo(ErrorResponse.ErrorTypes.MalformedRequest));
            Assert.That(errorResponse.Message, Is.EqualTo("Foo error"));
        }
        public void CanInstantiateNewErrorResponseConverter()
        {
            //Act
            var erc = new ErrorResponseConverter();

            //Assert
            Assert.That(erc, Is.Not.Null);
        }