I want to have a test resource that is available during my test and I know there is an attribute that deploys the item.
What is the attribute?
I want to have a test resource that is available during my test and I know there is an attribute that deploys the item.
What is the attribute?
[DeploymentItem("myFile1.txt")]
MSDN Doc on DeploymentItem
This is really useful if you are testing against a file or using the file as input to your test.
That really depends. Personally I hate the way that MSTest does this - either with the attribute or the separate "testrunconfig" file (add items in the "Deployment" section). I prefer the NUnit way (I use it with TestDriven.NET) - then if you want it to include a file in the output you do exactly what you would in regular VS projects; you toggle the "Copy to Output Directory" property.