Ejemplo n.º 1
0
        public void StopEveryAvailableScript_ExpectedToThrowNoScriptRunningException()
        {
            var coreDirectory     = $@"C:\temp\data\";
            var containingScripts = Directory.GetFiles(coreDirectory, "*", SearchOption.AllDirectories);


            var executor = new ScriptStateHandler(containingScripts);

            executor.Stop();
        }
Ejemplo n.º 2
0
        public void StopEveryAvailableScript_ExpectedTrue()
        {
            var coreDirectory     = $@"C:\temp\data\";
            var containingScripts = Directory.GetFiles(coreDirectory, "*", SearchOption.AllDirectories);


            var executor = new ScriptStateHandler(containingScripts);

            executor.Stop();

            foreach (var runningProcess in executor.RunningProcesses)
            {
                foreach (var process in Process.GetProcessesByName(runningProcess.ProcessName))
                {
                    Assert.IsTrue(process.HasExited);
                }
            }
        }