// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) // This code is distributed under the GNU LGPL (for details please see \doc\license.txt) using System; using System.Collections.Generic; using System.Threading.Tasks; using ICSharpCode.Core; using ICSharpCode.SharpDevelop.Gui; using ICSharpCode.SharpDevelop.Project; using ICSharpCode.SharpDevelop.Workbench; namespace ICSharpCode.UnitTesting { [SDService] public interface ITestService { /// /// Gets the test framework that supports the specified project. /// ITestFramework GetTestFrameworkForProject(IProject project); IOutputCategory UnitTestMessageView { get; } /// /// Gets the current test solution. /// This property should only be accessed by the main thread. /// ITestSolution OpenSolution { get; } /// /// Occurs when the open test solution has changed. /// event EventHandler OpenSolutionChanged; /// /// Builds the project (if necessary) and runs the specified tests. /// If tests are already running, the existing run is cancelled. /// Task RunTestsAsync(IEnumerable selectedTests, TestExecutionOptions options); /// /// Gets whether tests are currently running. /// bool IsRunningTests { get; } /// /// Aborts the current test run. /// This method has no effect if no tests are running. /// void CancelRunningTests(); } }