I am working on an MVC site with the ability to upload images, and I want to write a test that will load an image.
I made an image called TestImage.jpg and set Copy to Output to "Copy if Newer". In my test, I am trying to load this with the following code:
System.Drawing.Image testImage = System.Drawing.Image.FromFile(@"TestImage.jpg");
Should I copy the output copy to the same directory as the test? If not, how can I find out where it was copied? Some kind of relative path to the root of the project is best so that I can freely move the solution without this violation.
asp.net-mvc mstest
John hoge
source share