I'm late to the party with regards to using unit testing... trying to figure best practices and the such. My question is, given a class which is responsible for generating a PDF (or Doc/Html/Xml/etc.), how would I go about testing the final output file is correct? I figure a text based file (xml), I could just see if the strings match, but what about a binary file (pdf)? Should I just check against a MD5 hash? Should I even be testing this?
Thanks in advance.