private ProcessStartInfo CreateUpdateProcessStartInfo(string arguments) { var updateExecutable = _updateExecutableLocationService.FindUpdateExecutable(); //var executableFileName = _updateExecutableLocationService.GetApplicationExecutable(); var startInfo = new ProcessStartInfo(updateExecutable) { Arguments = arguments, WorkingDirectory = Path.GetDirectoryName(updateExecutable), RedirectStandardOutput = true, UseShellExecute = false, CreateNoWindow = true }; return(startInfo); }
public void GetDirectoryName_RootDirectory() { string result = Path.GetDirectoryName(@"C:\"); Assert.AreEqual(string.Empty, result); }
public void GetDirectoryName_NormalDirectory() { string result = Path.GetDirectoryName(@"C:\ParentDirectory\ChildDirectory"); Assert.AreEqual(@"C:\ParentDirectory", result); }