예제 #1
0
        IAsyncOperation RunTest(ITreeNavigator nav, IExecutionHandler mode, bool bringToFront = true)
        {
            if (nav == null)
            {
                return(null);
            }
            UnitTest test = nav.DataItem as UnitTest;

            if (test == null)
            {
                return(null);
            }
            NUnitService.ResetResult(test.RootTest);

            this.buttonRunAll.Sensitive = false;
            this.buttonStop.Sensitive   = true;

            if (bringToFront)
            {
                IdeApp.Workbench.GetPad <TestPad> ().BringToFront();
            }
            runningTestOperation            = testService.RunTest(test, mode);
            runningTestOperation.Completed += (OperationHandler)DispatchService.GuiDispatch(new OperationHandler(OnTestSessionCompleted));
            return(runningTestOperation);
        }
예제 #2
0
        AsyncOperation RunTest(ITreeNavigator nav, IExecutionHandler mode, bool bringToFront = true)
        {
            if (nav == null)
            {
                return(null);
            }
            UnitTest test = nav.DataItem as UnitTest;

            if (test == null)
            {
                return(null);
            }
            NUnitService.ResetResult(test.RootTest);

            this.buttonRunAll.Sensitive = false;
            this.buttonStop.Sensitive   = true;

            if (bringToFront)
            {
                IdeApp.Workbench.GetPad <TestPad> ().BringToFront();
            }
            runningTestOperation = testService.RunTest(test, mode);
            runningTestOperation.Task.ContinueWith(t => OnTestSessionCompleted(), TaskScheduler.FromCurrentSynchronizationContext());
            return(runningTestOperation);
        }