/// <summary>
        /// Constructor
        /// </summary>
        /// <param name="testRunnerFactory">The IBoostTestRunnerFactory which is to be used</param>
        /// <param name="boostTestDiscovererFactory">The IBoostTestDiscovererFactory which is to be used</param>
        public BoostTestExecutor(IBoostTestRunnerFactory testRunnerFactory, IBoostTestDiscovererFactory boostTestDiscovererFactory)
        {
            _testRunnerFactory = testRunnerFactory;
            _boostTestDiscovererFactory = boostTestDiscovererFactory;

            _cancelled = false;
        }
        /// <summary>
        /// Default constructor
        /// </summary>
        public BoostTestExecutor()
        {
            _testRunnerFactory = new DefaultBoostTestRunnerFactory();
            _boostTestDiscovererFactory = new BoostTestDiscovererFactory(_testRunnerFactory);
            _vsProvider = new DefaultVisualStudioInstanceProvider();

            _cancelled = false;
        }
Esempio n. 3
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="testRunnerFactory">The IBoostTestRunnerFactory which is to be used</param>
        /// <param name="boostTestDiscovererFactory">The IBoostTestDiscovererFactory which is to be used</param>
        /// <param name="provider">The Visual Studio instance provider</param>
        public BoostTestExecutor(IBoostTestRunnerFactory testRunnerFactory, IBoostTestDiscovererFactory boostTestDiscovererFactory, IVisualStudioInstanceProvider provider)
        {
            _testRunnerFactory          = testRunnerFactory;
            _boostTestDiscovererFactory = boostTestDiscovererFactory;
            _vsProvider = provider;

            _cancelled = false;
        }
Esempio n. 4
0
        /// <summary>
        /// Returns an IBoostTestDiscoverer based on the provided source.
        /// </summary>
        /// <param name="factory">The factory to utilise.</param>
        /// <param name="source">Source to be associated.</param>
        /// <param name="settings">A structure which states particular features of interest in the manufactured product.</param>
        /// <returns>An IBoostTestDiscoverer instance or null if one cannot be provided.</returns>
        public static IBoostTestDiscoverer GetDiscoverer(this IBoostTestDiscovererFactory factory, string source, Settings.BoostTestAdapterSettings settings)
        {
            Utility.Code.Require(factory, "factory");

            var list    = new[] { source };
            var results = factory.GetDiscoverers(list, settings);

            if (results != null)
            {
                var result = results.FirstOrDefault(x => x.Sources.Contains(source));
                if (result != null)
                {
                    return(result.Discoverer);
                }
            }

            return(null);
        }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="boostTestDiscovererFactory">A custom IBoostTestDiscovererFactory implementation.</param>
 public BoostTestDiscoverer(IBoostTestDiscovererFactory boostTestDiscovererFactory)
 {
     _boostTestDiscovererFactory = boostTestDiscovererFactory;
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="boostTestDiscovererFactory">A custom IBoostTestDiscovererFactory implementation.</param>
 public BoostTestDiscoverer(IBoostTestDiscovererFactory boostTestDiscovererFactory)
 {
     _boostTestDiscovererFactory = boostTestDiscovererFactory;
 }
 /// <summary>
 /// Constructor accepting an object of type IBoostTestDiscovererFactory (for mocking)
 /// </summary>
 /// <param name="newTestDiscovererFactory"></param>
 public BoostTestDiscoverer(IBoostTestDiscovererFactory newTestDiscovererFactory)
 {
     this.TestDiscovererFactory = newTestDiscovererFactory;
 }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="testRunnerFactory">The IBoostTestRunnerFactory which is to be used</param>
        /// <param name="boostTestDiscovererFactory">The IBoostTestDiscovererFactory which is to be used</param>
        /// <param name="provider">The Visual Studio instance provider</param>
        public BoostTestExecutor(IBoostTestRunnerFactory testRunnerFactory, IBoostTestDiscovererFactory boostTestDiscovererFactory, IVisualStudioInstanceProvider provider)
        {
            _testRunnerFactory = testRunnerFactory;
            _boostTestDiscovererFactory = boostTestDiscovererFactory;
            _vsProvider = provider;

            _cancelled = false;
        }