/// <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> /// 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; }
/// <summary> /// Default constructor /// </summary> public BoostTestExecutor() { _testRunnerFactory = new DefaultBoostTestRunnerFactory(); _boostTestDiscovererFactory = new BoostTestDiscovererFactory(_testRunnerFactory); _vsProvider = new DefaultVisualStudioInstanceProvider(); _cancelled = false; }
public IEnumerable <FactoryResult> GetDiscoverers(IReadOnlyCollection <string> sources, BoostTestAdapterSettings settings) { var tmpSources = new List <string>(sources); var discoverers = new List <FactoryResult>(); // sources that can be run on the external runner if (settings.ExternalTestRunner != null) { var extSources = tmpSources .Where(s => settings.ExternalTestRunner.ExtensionType.IsMatch(Path.GetExtension(s))) .ToList(); discoverers.Add(new FactoryResult() { Discoverer = new ExternalDiscoverer(settings.ExternalTestRunner, _dummySolution.Provider), Sources = extSources }); tmpSources.RemoveAll(s => extSources.Contains(s)); } // sources that support list-content parameter var listContentSources = tmpSources .Where(s => (s == ("ListContentSupport" + BoostTestDiscoverer.ExeExtension))) .ToList(); if (listContentSources.Count > 0) { IBoostTestRunnerFactory factory = A.Fake <IBoostTestRunnerFactory>(); A.CallTo(() => factory.GetRunner(A <string> ._, A <BoostTestRunnerFactoryOptions> ._)).ReturnsLazily((string source, BoostTestRunnerFactoryOptions options) => new StubListContentRunner(source)); discoverers.Add(new FactoryResult() { Discoverer = new ListContentDiscoverer(factory, _dummySolution.Provider), Sources = listContentSources }); tmpSources.RemoveAll(s => listContentSources.Contains(s)); } // sources that NOT support the list-content parameter var sourceCodeSources = tmpSources .Where(s => Path.GetExtension(s) == BoostTestDiscoverer.ExeExtension) .ToList(); if (sourceCodeSources.Count > 0) { discoverers.Add(new FactoryResult() { Discoverer = new SourceCodeDiscoverer(_dummySolution.Provider), Sources = sourceCodeSources }); } return(discoverers); }
/// <summary> /// Constructor. /// </summary> /// <param name="factory">A custom IBoostTestRunnerFactory implementation.</param> public BoostTestDiscovererFactory(IBoostTestRunnerFactory factory) { _factory = factory; }
/// <summary> /// Constructor. /// </summary> /// <param name="factory">A custom implementation of IBoostTestRunnerFactory.</param> /// <param name="vsProvider">Visual Studio Instance Provider</param> public ListContentDiscoverer(IBoostTestRunnerFactory factory, IVisualStudioInstanceProvider vsProvider) { _factory = factory; _vsProvider = vsProvider; }
public OneShotTestBatchStrategy(IBoostTestRunnerFactory testRunnerFactory, BoostTestAdapterSettings settings, CommandLineArgsBuilder argsBuilder) : base(testRunnerFactory, settings, argsBuilder) { _fallBackStrategy = new TestSuiteTestBatchStrategy(testRunnerFactory, settings, argsBuilder); }
public SourceTestBatchStrategy(IBoostTestRunnerFactory testRunnerFactory, BoostTestAdapterSettings settings, CommandLineArgsBuilder argsBuilder) : base(testRunnerFactory, settings, argsBuilder) { }
public void SetUp() { this.RunnerFactory = new StubBoostTestRunnerFactory(new[] { ("ListContentSupport" + BoostTestDiscoverer.ExeExtension) }); this.DiscovererFactory = new BoostTestDiscovererFactory(this.RunnerFactory); }
/// <summary> /// Constructor /// </summary> /// <param name="testRunnerFactory">Factory which provides a test runner for a specific test source</param> /// <param name="settings">Adapter settings which are currently in use</param> /// <param name="argsBuilder">Factory function which populates a BoostTestRunnerCommandLineArgs based on the provided source and settings</param> protected TestBatchStrategy(IBoostTestRunnerFactory testRunnerFactory, BoostTestAdapterSettings settings, CommandLineArgsBuilder argsBuilder) { this.TestRunnerFactory = testRunnerFactory; this.Settings = settings; this.ArgsBuilder = argsBuilder; }
/// <summary> /// Constructor /// </summary> /// <param name="factory">The base underlying factory which will produce the Boost.Test runners</param> public CachingBoostTestRunnerFactory(IBoostTestRunnerFactory factory) { BaseFactory = factory; _cache = new Dictionary <Tuple <string, BoostTestRunnerFactoryOptions>, IBoostTestRunner>(); }
public void SetUp() { this.RunnerFactory = new StubBoostTestRunnerFactory(new[] { "test.listcontent.exe" }); this.DiscovererFactory = new BoostTestDiscovererFactory(this.RunnerFactory); }
/// <summary> /// Constructor /// </summary> /// <param name="testRunnerFactory">Factory which provides a test runner for a specific test source</param> /// <param name="settings">Adapter settings which are currently in use</param> /// <param name="argsBuilder">Factory function which populates a BoostTestRunnerCommandLineArgs based on the provided source and settings</param> protected TestBatchStrategy(IBoostTestRunnerFactory testRunnerFactory, BoostTestAdapterSettings settings, CommandLineArgsBuilder argsBuilder) { this.TestRunnerFactory = testRunnerFactory; this.Settings = settings; this.ArgsBuilder = argsBuilder; }
/// <summary> /// Constructor. /// </summary> /// <param name="factory">A custom IBoostTestRunnerFactory implementation.</param> public BoostTestDiscovererFactory(IBoostTestRunnerFactory factory) { _factory = factory; }
/// <summary> /// Constructor. /// </summary> /// <param name="factory">A custom IBoostTestRunnerFactory implementation.</param> public BoostTestDiscovererFactory(IBoostTestRunnerFactory factory, IVisualStudioInstanceProvider provider) { _factory = factory; _vsInstanceProvider = provider; }
/// <summary> /// Determines whether the provided source has --list_content capabilities /// </summary> /// <param name="source">The source to test</param> /// <param name="settings">Test adapter settings</param> /// <returns>true if the source has list content capabilities; false otherwise</returns> private static bool IsListContentSupported(IBoostTestRunnerFactory factory, string source, BoostTestAdapterSettings settings) { var runner = factory.GetRunner(source, settings.TestRunnerFactoryOptions); return((runner != null) && (runner.Capabilities.ListContent)); }
/// <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; }
/// <summary> /// Constructor. /// </summary> /// <param name="factory">A custom implementation of IBoostTestRunnerFactory.</param> /// <param name="vsProvider">Visual Studio Instance Provider</param> public ListContentDiscoverer(IBoostTestRunnerFactory factory, IVisualStudioInstanceProvider vsProvider) { _factory = factory; _vsProvider = vsProvider; }
public SourceTestBatchStrategy(IBoostTestRunnerFactory testRunnerFactory, BoostTestAdapterSettings settings, CommandLineArgsBuilder argsBuilder) : base(testRunnerFactory, settings, argsBuilder) { }