private string TempDirectory { get { return Path.GetTempPath(); } } private string GetTestFilename() { return System.IO.Path.Combine(GetExecutingPath(), @"Test\Import\Files\MyFile.csv"); } private string GetExecutingPath() { string executingPath = System.Reflection.Assembly.GetExecutingAssembly().CodeBase; string prefix = "file:///"; if (executingPath.StartsWith(prefix)) executingPath = executingPath.Substring(prefix.Length); executingPath = System.IO.Path.GetDirectoryName(executingPath); return executingPath; }
This layout has been adapted from an original design by Ruthsarian Layouts, downloaded from oswd.org