Example #1
0
 protected virtual void ExtractTestNames(IEnumerable <TestContext> tests)
 {
     foreach (var test in tests)
     {
         var testName = CSharpPreprocessorHelper.GetClassName(test.Input);
         this.TestNames.Add(testName);
     }
 }
        protected override void ExtractTestNames(IEnumerable <TestContext> tests)
        {
            var trialTests   = 1;
            var competeTests = 1;

            foreach (var test in tests)
            {
                var namespacePrefix = CSharpPreprocessorHelper.GetNamespaceName(test.Input);
                namespacePrefix = namespacePrefix == null ? string.Empty : namespacePrefix + ".";
                this.TestClassNames.Add($"{namespacePrefix}{CSharpPreprocessorHelper.GetClassName(test.Input)}");
                if (test.IsTrialTest)
                {
                    var testNumber = trialTests < 10 ? $"00{trialTests}" : $"0{trialTests}";
                    this.TestNames.Add($"{TrialTest}.{testNumber}");
                    trialTests++;
                }
                else
                {
                    var testNumber = competeTests < 10 ? $"00{competeTests}" : $"0{competeTests}";
                    this.TestNames.Add($"{CompeteTest}.{testNumber}");
                    competeTests++;
                }
            }
        }