Running Visual Studio unit tests with a bunch of different files to be deployed is quite inconvenient. See what Sergey found out on that issue
here.
Suppose you have several tests all using x different files, which are to be deployed separately. So currently there seemed no other way than adding x different deployment attribute values on each test:
[TestMethod]
[DeploymentItem("testfile_1.txt")]
[DeploymentItem("testfile_2.txt")]
...
[DeploymentItem("testfile_x.txt")]
public void MethodXzyTest()
{
}
A convenient solution is to move those files into a separate folder (here "TestData") within the Visual Studio solution. Now only this folder needs to be specified as deploymentitem:
[TestMethod]
[DeploymentItem("TestData\\")]
public void MethodXzyTest()
{
}
However, what still seems to be missing is a way to declare deployment items at some central place within the test class.