Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)
will give you the path to the unit test launched by the DLL itself.
, - Build Action = Content Copy to Output Directory = Copy if newer. , . .
:
- ,
<project root>\TestData\Data1.txt. - ,
<project root>\bin\Debug\TestData\Data1.txt. Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "TestData\Data1.txt").