public void SetUp() { var sourceDirectory = @"{0}\source".FormatWith(BaseDir); var destinationDirectory = @"{0}\dest".FormatWith(BaseDir); if (Directory.Exists(BaseDir)) { Directory.Delete(BaseDir, true); } Directory.CreateDirectory(BaseDir); Directory.CreateDirectory(sourceDirectory); File.WriteAllLines(_path.Combine(sourceDirectory, "test.txt"), new[] { "the test" }); Directory.CreateDirectory(destinationDirectory); _sourceFilePath = _path.GetFullPath(_path.Combine(sourceDirectory, "test.txt")); _destinationFolderPath = _path.GetFullPath(destinationDirectory); }
static string FindFile(string file) { string p = _path.GetFullPath(file); //string p = Path.Combine(Environment.CurrentDirectory, file); _log.DebugFormat("Looking for deployment dll '{0}' at '{1}'", file, p); if (!File.Exists(p)) { _log.ErrorFormat("Couldn't find '{0}'", p); p = string.Empty; } return(p); }