public static void DisposeRunspace() { CmdletUnitTest.TestRunspace.RunPSCode( @"[void]([UIAutomation.CurrentData]::ResetData()); " + @"rmo UIAutomation; " + @"exit; "); CmdletUnitTest.TestRunspace.CloseRunspace(); if (TestProcess != null) { try { TestProcess.CloseMainWindow(); } catch { } try { TestProcess.Kill(); } catch { } } var processes = Process.GetProcessesByName(TestFormProcess); foreach (var process in processes) { try { process.CloseMainWindow(); } catch {} try { process.Kill(); } catch {} } TestProcessStartInfo = null; TestProcess = null; }
public void TestDeadAfterKilled() { // Arrange. TestProcess process = new TestProcess(); // Act. process.Kill(); // Assert. Assert.IsTrue(process.Dead); }
public void TestDeadAfterKilled() { // Arrange. TestProcess process = new TestProcess(); // Act. process.Kill(); // Assert. Assert.IsTrue(process.Dead); }
public void TestStartNextProcess() { // Arrange. TestProcess first = new TestProcess(); TestProcess second = new TestProcess(); first.Next = second; first.Kill(); // Act. this.game.ProcessManager.AddProcess(first); this.game.Update(1.0f); // Assert. Assert.IsTrue(first.Dead); Assert.IsTrue(second.Active); }
public void TestStartNextProcess() { // Arrange. TestProcess first = new TestProcess(); TestProcess second = new TestProcess(); first.Next = second; first.Kill(); // Act. this.game.ProcessManager.AddProcess(first); this.game.Update(1.0f); // Assert. Assert.IsTrue(first.Dead); Assert.IsTrue(second.Active); }