One part of a project that I am writing unit tests for extracts data from a jpeg header.
I would like to create a unit test that tests this extraction, using a known image (so I can test the known properties of that image).
It seems logical to me that this sample image be kept in the testing project as a Resource, but I am not sure how to do so. If it was a WPF project, I’d simply use the pack syntax.
Is there a Best Practice for something like this (or, even, something that would work)?
Thanks,
wTs
This is based on @Matthew Manela’s posted answer, which pointed me in the (or, perhaps more appropriately, one) right direction. It feels a bit kludgey to me, but it works.
First, set the image as a Content resource, with Copy Always.
Then, use the following helper function (used by different tests):