Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        public void GetDirectoryName_RootDirectory()
        {
            string result = Path.GetDirectoryName(@"C:\");

            Assert.AreEqual(string.Empty, result);
        }
Esempio n. 3
0
        public void GetDirectoryName_NormalDirectory()
        {
            string result = Path.GetDirectoryName(@"C:\ParentDirectory\ChildDirectory");

            Assert.AreEqual(@"C:\ParentDirectory", result);
        }