How can I use an external data file in my Visual Studio unit tests? If I try to just include it in the test project and set Copy To Output Directory to true, it still can't be found.
What I have is:
[TestMethod]
public void DoMyTest() {
using (StreamReader rdr = new StreamReader("MyTestData.txt")) {
blahblah
}
}
However, the file does not exist so I get an exception. My test data doesn't map well to XML or CSV, so using the DataSourceAttribute is not a viable option.