public void Can_Deserialize_Parentless_aka_Inline_List_Items_Without_Matching_Class_Name() { string xmlpath = this.PathFor("InlineListSample.xml"); XDocument doc = XDocument.Load(xmlpath); XmlDeserializer xml = new XmlDeserializer(); InlineListSample output = xml.Deserialize <InlineListSample>(new RestResponse { Content = doc.ToString() }); Assert.IsNotEmpty(output.Images); Assert.AreEqual(4, output.Images.Count); }
public void Can_Deserialize_Nested_List_Items_With_Matching_Class_Name() { string xmlpath = this.PathFor("NestedListSample.xml"); XDocument doc = XDocument.Load(xmlpath); XmlAttributeDeserializer xml = new XmlAttributeDeserializer(); InlineListSample output = xml.Deserialize <InlineListSample>(new RestResponse { Content = doc.ToString() }); Assert.NotEmpty(output.images); Assert.Equal(4, output.images.Count); }