public void Should_get_included_tests() { var a = new CheckedNode("A"); var aa = new CheckedNode("AA", false) { Parent = a }; var ab = new CheckedNode("AB") { Parent = a }; var aba = new CheckedNode("ABA") { Parent = ab }; var abaa = new CheckedNode("ABAA", false) { Parent = aba }; var abb = new CheckedNode("ABB") { Parent = ab }; var abba = new CheckedNode("ABBA", false) { Parent = abb }; var abbb = new CheckedNode("ABBA", false) { Parent = abb }; a.Children.Add(aa); a.Children.Add(ab); ab.Children.Add(aba); ab.Children.Add(abb); abb.Children.Add(abba); abb.Children.Add(abbb); aba.Children.Add(abaa); a.IsIncluded = false; abba.IsIncluded = true; aba.IsIncluded = true; var testsSelector = new TestsSelector(); var minimalTreeId = testsSelector.MinimalTreeId(a, n => n.Name, n => n.Children); minimalTreeId.ShouldEqual(new List<string> { "ABA ABBA"}); }
public void Should_get_included_tests() { var a = new CheckedNode("A"); var aa = new CheckedNode("AA", false) { Parent = a }; var ab = new CheckedNode("AB") { Parent = a }; var aba = new CheckedNode("ABA") { Parent = ab }; var abaa = new CheckedNode("ABAA", false) { Parent = aba }; var abb = new CheckedNode("ABB") { Parent = ab }; var abba = new CheckedNode("ABBA", false) { Parent = abb }; var abbb = new CheckedNode("ABBA", false) { Parent = abb }; a.Children.Add(aa); a.Children.Add(ab); ab.Children.Add(aba); ab.Children.Add(abb); abb.Children.Add(abba); abb.Children.Add(abbb); aba.Children.Add(abaa); a.IsIncluded = false; abba.IsIncluded = true; aba.IsIncluded = true; var testsSelector = new TestsSelector(); var minimalTreeId = testsSelector.MinimalTreeId(a, n => n.Name, n => n.Children); minimalTreeId.ShouldEqual(new List <string> { "ABA ABBA" }); }
public MsTestRunContext( MsTestResultsParser parser, IProcesses processes, CommonServices svc, //---------- string xUnitPath, string assemblyPath, TestsSelector testsSelector) { _parser = parser; _processes = processes; _svc = svc; _assemblyPath = assemblyPath; _testsSelector = testsSelector; _nUnitConsolePath = xUnitPath; _cancellationTokenSource = new CancellationTokenSource(); }
public XUnitTestsRunContext( XUnitResultsParser parser, IProcesses processes, CommonServices svc, //---------- string xUnitPath, string assemblyPath, TestsSelector testsSelector) { _parser = parser; _processes = processes; _svc = svc; _assemblyPath = assemblyPath; _testsSelector = testsSelector; _nUnitConsolePath = xUnitPath;// @"C:\PLIKI\DOWNLOAD\xunit-2.0-beta-3\src\xunit.console\bin\Debug\xunit.console.exe"; _cancellationTokenSource = new CancellationTokenSource(); // var testsSelector = new TestsSelector(); // _selectedTests = testsSelector.GetIncludedTests(loadContext.Namespaces); //_log.Debug("Created tests to run: " + _selectedTests.TestsDescription); }
public NUnitTestsRunContext( OptionsModel options, IProcesses processes, CommonServices svc, NUnitResultsParser parser, //---------- string nUnitConsolePath, string assemblyPath, TestsSelector testsSelector) { _options = options; _parser = parser; _processes = processes; _svc = svc; _assemblyPath = assemblyPath; _nUnitConsolePath = nUnitConsolePath; _testsSelector = testsSelector; _cancellationTokenSource = new CancellationTokenSource(); // var testsSelector = new TestsSelector(); // _selectedTests = testsSelector.GetIncludedTests(loadContext.Namespaces); // _log.Debug("Created tests to run: " + _selectedTests.TestsDescription); }
public ITestsRunContext CreateRunContext(TestsLoadContext loadContext, string mutatedPath) { var tesele = new TestsSelector(loadContext.Namespaces); return _contextFactory.CreateWithParams(MsTestConsolePath, mutatedPath, tesele); }
public ITestsRunContext CreateRunContext(TestsLoadContext loadContext, string mutatedPath) { var selector = new TestsSelector(loadContext.Namespaces); return(_testsRunContextFactory.CreateWithParams(_nunitConsolePath, mutatedPath, selector)); }