Пример #1
0
        private List <TestCase> GetTests(IEnumerable <string> sources)
        {
            var tests = new List <TestCase>();

            var discoverer = new Catch2Interface.Discoverer(_settings);


            var testcases = discoverer.GetTests(sources);

            LogVerbose(TestMessageLevel.Informational, discoverer.VerboseLog);
            LogVerbose(TestMessageLevel.Informational, "Testcase count: " + testcases.Count.ToString());

            foreach (var testcase in testcases)
            {
                tests.Add(SharedUtils.ConvertTestcase(testcase));
            }

            return(tests);
        }
Пример #2
0
        private void DiscoverTests(IEnumerable <string> sources)
        {
            var discoverer = new Catch2Interface.Discoverer(_settings);

            var testcases = discoverer.GetTests(sources);

            if (!string.IsNullOrEmpty(discoverer.Log))
            {
                LogNormal(TestMessageLevel.Informational, $"Discover log:{Environment.NewLine}{discoverer.Log}");
            }

            // Add testcases to discovery sink
            LogDebug(TestMessageLevel.Informational, "Start adding test cases to discovery sink");
            foreach (var testcase in testcases)
            {
                _discoverySink.SendTestCase(SharedUtils.ConvertTestcase(testcase));
                LogDebug(TestMessageLevel.Informational, $"  {testcase.Name}");
            }
            LogDebug(TestMessageLevel.Informational, "Finished adding test cases to discovery sink");
        }
Пример #3
0
        private List <TestCase> GetTests(IEnumerable <string> sources)
        {
            var tests = new List <TestCase>();

            var discoverer = new Catch2Interface.Discoverer(_settings);

            var testcases = discoverer.GetTests(sources);

            if (!string.IsNullOrEmpty(discoverer.Log))
            {
                LogNormal(TestMessageLevel.Informational, $"Discover log:{Environment.NewLine}{discoverer.Log}");
            }
            LogDebug(TestMessageLevel.Informational, $"Testcase count: {testcases.Count}");

            foreach (var testcase in testcases)
            {
                tests.Add(SharedUtils.ConvertTestcase(testcase));
            }

            return(tests);
        }
Пример #4
0
        private void DiscoverTests(IEnumerable <string> sources)
        {
            var discoverer = new Catch2Interface.Discoverer(_settings);

            if (_settings.LoggingLevel == Catch2Interface.LoggingLevels.Verbose)
            {
                foreach (var source in sources)
                {
                    LogVerbose(TestMessageLevel.Informational, source);
                }
            }

            var testcases = discoverer.GetTests(sources);

            LogVerbose(TestMessageLevel.Informational, discoverer.VerboseLog);
            LogVerbose(TestMessageLevel.Informational, "Testcase count: " + testcases.Count.ToString());

            // Add testcases to discovery sink
            foreach (var testcase in testcases)
            {
                _discoverySink.SendTestCase(SharedUtils.ConvertTestcase(testcase));
                LogVerbose(TestMessageLevel.Informational, testcase.Name);
            }
        }