public override void Run() { projects = new List <IProject>(); IMember m = TestableCondition.GetMember(Owner); IClass c = (m != null) ? m.DeclaringType : TestableCondition.GetClass(Owner); IProject project = TestableCondition.GetProject(Owner); string namespaceFilter = TestableCondition.GetNamespace(Owner); if (project != null) { projects.Add(project); } else if (UnitTestsPad.Instance != null) { projects.AddRange(UnitTestsPad.Instance.TestTreeView.GetProjects()); } if (projects.Count > 0) { runningTestCommand = this; try { BeforeRun(); if (IsRunningTest) { currentProject = projects[0]; Run(currentProject, namespaceFilter, c, m); } } catch { runningTestCommand = null; throw; } } }
public override void Run() { projects = new List<IProject>(); IMember m = TestableCondition.GetMember(Owner); IClass c = (m != null) ? m.DeclaringType : TestableCondition.GetClass(Owner); IProject project = TestableCondition.GetProject(Owner); string namespaceFilter = TestableCondition.GetNamespace(Owner); if (project != null) { projects.Add(project); } else if (UnitTestsPad.Instance != null) { projects.AddRange(UnitTestsPad.Instance.TestTreeView.GetProjects()); } if (projects.Count > 0) { runningTestCommand = this; try { BeforeRun(); if (IsRunningTest) { currentProject = projects[0]; Run(currentProject, namespaceFilter, c, m); } } catch { runningTestCommand = null; throw; } } }
/// <summary> /// Called by derived classes when a single test run /// is finished. /// </summary> protected void TestsFinished() { WorkbenchSingleton.AssertMainThread(); // Read the rest of the file just in case. testResultsMonitor.Stop(); testResultsMonitor.Read(); StopMonitoring(); projects.Remove(currentProject); if (projects.Count > 0) { currentProject = projects[0]; Run(currentProject, null, null, null); } else { runningTestCommand = null; UpdateUnitTestsPadToolbar(); if (TaskService.SomethingWentWrong && ErrorListPad.ShowAfterBuild) { ShowErrorList(); } OnAfterRunTests(); } }
/// <summary> /// Stops running the tests. /// </summary> public void Stop() { StopActiveTestRunner(); runningTestCommand = null; UpdateUnitTestsPadToolbar(); OnStop(); }
public override void Run() { AbstractRunTestCommand runTestCommand = AbstractRunTestCommand.RunningTestCommand; if (runTestCommand != null) { runTestCommand.Stop(); } }
public override void Run() { GetUnitTestsPad(); selectedTests = GetSelectedTests(); if (selectedTests.HasProjects) { runningTestCommand = this; BeforeRun(); BuildAndRunTests(); } }
public override void Run() { GetUnitTestsPad(context.OpenUnitTestsPad); selectedTests = new SelectedTests(Owner, this.unitTestsPad.GetProjects()); if (selectedTests.HasProjects) { runningTestCommand = this; BeforeRun(); BuildAndRunTests(); } }
/// <summary> /// Stops running the tests. /// </summary> public void Stop() { runningTestCommand = null; UpdateUnitTestsPadToolbar(); projects.Clear(); testResultsMonitor.Stop(); StopMonitoring(); OnStop(); }
/// <summary> /// Called by derived classes when a single test run /// is finished. /// </summary> protected void TestRunCompleted() { StopActiveTestRunner(); selectedTests.RemoveFirstProject(); if (selectedTests.HasProjects) { RunTests(selectedTests); } else { StopProgressMonitor(); runningTestCommand = null; UpdateUnitTestsPadToolbar(); ShowErrorList(); OnAfterRunTests(); } }
protected override void OnBeforeBuild() { IsOnBeforeBuildMethodCalled = true; RunningTestCommandPropertyWhenOnBeforeBuildCalled = AbstractRunTestCommand.RunningTestCommand; IsRunningTestWhenOnBeforeBuildCalled = AbstractRunTestCommand.IsRunningTest; }
/// <summary> /// Called by derived classes when a single test run /// is finished. /// </summary> protected void TestsFinished() { // Read the rest of the file just in case. testResultsMonitor.Stop(); testResultsMonitor.Read(); StopMonitoring(); projects.Remove(currentProject); if (projects.Count > 0) { currentProject = projects[0]; Run(currentProject, null, null, null); } else { runningTestCommand = null; UpdateUnitTestsPadToolbar(); if (TaskService.SomethingWentWrong && ErrorListPad.ShowAfterBuild) { ShowErrorList(); } OnAfterRunTests(); } }