public void TestCompletedMethodIsCalledSafelyAndAsynchronouslyAfterProcessExitEventFires()
        {
            runCommand.Run();
            context.MockUnitTestWorkbench.SafeThreadAsyncMethodCalls.Clear();
            buildProject.FireBuildCompleteEvent();
            processRunner.FireProcessExitedEvent();

            Action callTestRunCompletedAction = runCommand.GetCallRunTestCompletedAction();

            Assert.AreEqual(callTestRunCompletedAction, context.MockUnitTestWorkbench.SafeThreadAsyncMethodCalls[0]);
        }
        public void FireProcessExitedEventFiresEvent()
        {
            bool fired = false;

            processRunner.ProcessExited += delegate(object o, EventArgs e) {
                fired = true;
            };
            processRunner.FireProcessExitedEvent();

            Assert.IsTrue(fired);
        }