Ejemplo n.º 1
0
 private List <TestCase> GetTestCases(string executable, ref List <TestCase> testCases)
 {
     if (testCases == null)
     {
         testCases = new List <TestCase>();
         var discoverer = new GoogleTestDiscoverer(_testEnvironment.Logger, _testEnvironment.Options);
         testCases.AddRange(discoverer.GetTestsFromExecutable(executable));
     }
     return(testCases);
 }
        private static void AddTestCasesOfExecutable(List <TestCase> allTestCasesInExecutables, string executable, SettingsWrapper settings, ILogger logger, Func <bool> testrunIsCanceled)
        {
            if (testrunIsCanceled())
            {
                return;
            }

            var discoverer = new GoogleTestDiscoverer(logger, settings);

            settings.ExecuteWithSettingsForExecutable(executable, () =>
            {
                allTestCasesInExecutables.AddRange(discoverer.GetTestsFromExecutable(executable));
            }, logger);
        }
Ejemplo n.º 3
0
        private static IList <TestCase> GetTestCasesOfExecutable(string executable, SettingsWrapper settings, ILogger logger, Func <bool> testrunIsCanceled)
        {
            IList <TestCase> testCases = new List <TestCase>();

            if (testrunIsCanceled())
            {
                return(testCases);
            }

            var discoverer = new GoogleTestDiscoverer(logger, settings);

            settings.ExecuteWithSettingsForExecutable(executable, logger, () =>
            {
                testCases = discoverer.GetTestsFromExecutable(executable);
            });

            return(testCases);
        }
Ejemplo n.º 4
0
        private IEnumerable <TestCase> GetAllTestCasesInExecutables(IEnumerable <string> executables)
        {
            var allTestCasesInExecutables = new List <TestCase>();

            var discoverer = new GoogleTestDiscoverer(_testEnvironment);

            foreach (string executable in executables.OrderBy(e => e))
            {
                if (_canceled)
                {
                    allTestCasesInExecutables.Clear();
                    break;
                }

                allTestCasesInExecutables.AddRange(discoverer.GetTestsFromExecutable(executable));
            }

            return(allTestCasesInExecutables);
        }
Ejemplo n.º 5
0
        private IEnumerable <TestCase> GetAllTestCasesInExecutables(IEnumerable <string> executables)
        {
            var allTestCasesInExecutables = new List <TestCase>();

            var discoverer = new GoogleTestDiscoverer(_logger, _settings);

            foreach (string executable in executables.OrderBy(e => e))
            {
                if (_canceled)
                {
                    allTestCasesInExecutables.Clear();
                    break;
                }

                _settings.ExecuteWithSettingsForExecutable(executable, () =>
                {
                    allTestCasesInExecutables.AddRange(discoverer.GetTestsFromExecutable(executable));
                }, _logger);
            }

            return(allTestCasesInExecutables);
        }
Ejemplo n.º 6
0
        private IEnumerable<TestCase> GetAllTestCasesInExecutables(IEnumerable<string> executables)
        {
            var allTestCasesInExecutables = new List<TestCase>();

            var discoverer = new GoogleTestDiscoverer(_testEnvironment);
            foreach (string executable in executables.OrderBy(e => e))
            {
                if (_canceled)
                {
                    allTestCasesInExecutables.Clear();
                    break;
                }

                allTestCasesInExecutables.AddRange(discoverer.GetTestsFromExecutable(executable));
            }

            return allTestCasesInExecutables;
        }