Does anyone know if there is some way to specify a RELATIVE path to an .MDF
file for testing with the Team Unit Testing stuff in Visual Studio 2005?
The whole point of including a database with a Unit Test is to provide
testing data, so it can travel WITH the Unit test.
As such, I don't want to have to hard code a path to an MDF file.
i.e., I want to be able to do something like with the AttachDbFilename -
[DataSource("System.Data.SqlClient", @"Data
Source=.\SQLEXPRESS;AttachDbFilename=..\TEST.MDF;I ntegrated Security=True",
"TestConfig", DataAccessMethod.Random)]
Instead of:
[DataSource("System.Data.SqlClient", @"Data
Source=.\SQLEXPRESS;AttachDbFilename=c:\projects\m yproject\TEST.MDF;Integrated Security=True", "TestConfig", DataAccessMethod.Random)]
I could not find any other more obvious form in which to post this question,
so if someone knows a more appropriate form, please advise.
Thanks.