public void StopEveryAvailableScript_ExpectedToThrowNoScriptRunningException() { var coreDirectory = $@"C:\temp\data\"; var containingScripts = Directory.GetFiles(coreDirectory, "*", SearchOption.AllDirectories); var executor = new ScriptStateHandler(containingScripts); executor.Stop(); }
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); } } }