public void TestGenericType() { using (var xmlReader = ReportReaderHelpers.CreateXmlReader(@"<Message><specificTrash>1</specificTrash><SpecificTransaction><specifictransactiontrash>2</specifictransactiontrash></SpecificTransaction></Message>")) { var interpreter = new XmlAttributeInterpreter(); var contentReader = new ClassContentReader <Message <SpecificTransaction> >(new ContentReaderCollection(interpreter, StandardConfigurations.EmptyOnDeserializeConfiguration), interpreter, StandardConfigurations.EmptyOnDeserializeConfiguration); var message = contentReader.Read(new SimpleXmlReader(xmlReader, true)); message.Should().BeEquivalentTo(new Message <SpecificTransaction> { SpecificTrash = "1", Transaction = new SpecificTransaction { SpecificTransactionTrash = "2" }, }); } }
public void SetUp() { collection = new TestContentWriterCollection(); xmlAttributeInterpreter = new XmlAttributeInterpreter(); }