I already have an XSD schema for the next XML file
<?xml version="1.0"?>
<note>
<to> </to>
<from> </from>
<datetime> </datetime>
<heading> </heading>
<body> </body>
</note>
I used NoteGnerator to generate schema-based xml files. Xml files should be generated for some templates / specifications, such as:
<?xml version="1.0"?>
<note>
<to> Lucy </to>
<from> Lily </from>
<datetime> --date--time-- </datetime>
<heading> reminder </heading>
<body> do not forget my pen </body>
</note>
Another template / specification will look like this:
<?xml version="1.0"?>
<note>
<to> Lily </to>
<from> Lucy </from>
<datetime> --date--time-- </datetime>
<heading> reply </heading>
<body> no problem </body>
</note>
where <datetime>is the dynamic value when generating xml (therefore, this value cannot be predetermined). Based on the XSD schema and these two XML specifications, I can easily generate XML messages.
How can I unit test generated xml files?
XML ? xml ? datetime , , XML , , , ? deserialise xml to # object, #?