PageRenderTime 44ms CodeModel.GetById 36ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/src/NUnit/util/Interfaces/ITestRunnerFactory.cs

#
C# | 33 lines | 10 code | 3 blank | 20 comment | 0 complexity | e57a62fb5c9293f200d8e7a834c367e2 MD5 | raw file
 1// ****************************************************************
 2// This is free software licensed under the NUnit license. You
 3// may obtain a copy of the license as well as information regarding
 4// copyright ownership at http://nunit.org.
 5// ****************************************************************
 6
 7using System;
 8using NUnit.Core;
 9
10namespace NUnit.Util
11{
12    /// <summary>
13    /// A Test Runner factory can supply a suitable test runner for a given package
14    /// </summary>
15    public interface ITestRunnerFactory
16    {
17        /// <summary>
18        /// Return a suitable runner for the package provided as an argument
19        /// </summary>
20        /// <param name="package">The test package to be loaded by the runner</param>
21        /// <returns>A TestRunner</returns>
22        TestRunner MakeTestRunner(TestPackage package);
23
24        /// <summary>
25        /// Return true if the provided runner is suitable for reuse in loading
26        /// the test package provided. Otherwise, return false.
27        /// </summary>
28        /// <param name="package"></param>
29        /// <param name="runner"></param>
30        /// <returns>True if the runner may be reused</returns>
31        bool CanReuse(TestRunner runner, TestPackage package);
32    }
33}