Unit test: How best to provide an XML input?
- by TheSilverBullet
I need to write a unit test which validates the serialization of two attributes of an XML(size ~ 30 KB) file.
What is the best way to provide an input for this test?
Here are the options I have considered:
Add the file to the project and use a file reader
Pass the contents of the XML as a string
Create the XML through a program and pass it
…