public void ShouldBeAbleToConvertAsStringWhitoutIndentation()
 {
     SampleDataClass data = new SampleDataClass() { Id = 1, Description = "foo" };
     string result = data.Convert(new XmlConvertSettings() { Formatting = Formatting.None });
     var expected = "<SampleDataClass><Id>1</Id><Description>foo</Description></SampleDataClass>";
     result.ShouldEqualWithDiff(expected);
 }
        public void ConvertToXmlShouldReturnAnXDocumentEvenWithNotInitializedValues()
        {
            SampleDataClass data = new SampleDataClass();
            XDocument xDoc = data.ConvertToXml();
            var expected = "<SampleDataClass>\r\n  <Id>0</Id>\r\n  <Description></Description>\r\n</SampleDataClass>";

            Assert.NotNull(xDoc);
            Assert.Equal(expected, xDoc.ToString());
        }
 public void ShouldConvertBasicProperties()
 {
     SampleDataClass data = new SampleDataClass() { Id = 1, Description = "foo" };
     XDocument xDoc = data.ConvertToXml();
     var expected = "<SampleDataClass>\r\n  <Id>1</Id>\r\n  <Description>foo</Description>\r\n</SampleDataClass>";
     xDoc.ToString().ShouldEqualWithDiff(expected);
 }