Example #1
0
        public static TestCase AddToSink(string source, DefinitionSource definitionSources, ITestCaseDiscoverySink discoverySink)
        {
            var it = definitionSources;
              var testCase = new TestCase(it.ParentDescription + " " + it.Description + ".spec" + it.LineNumber, specTestExecutor.ExecutorUri, source);
              testCase.CodeFilePath = it.CodeBase;
              testCase.LineNumber = it.LineNumber;
              testCase.DisplayName = it.Description;
              testCase.SetPropertyValue(TestResultProperties.ErrorMessage, "No error");
              testCase.Traits.Add("File", it.FileName);
              testCase.Traits.Add("SpecId", it.Id);

              if (discoverySink != null)
              {
            discoverySink.SendTestCase(testCase);
              }
              return testCase;
        }
Example #2
0
        public static DefinitionSource CreateSource(Specification Specification)
        {
            var result = new DefinitionSource();
              result.Id = Specification.Id;

              result.ParentDescription = Specification.Parent.Description;
              result.Description = Specification.Description;
              result.Enabled = Specification.Enabled;
              result.RanSuccesfully = Specification.RanSuccesfully;
              result.ExecutionResult = Specification.ExecutionResult;
              result.EndTime = Specification.EndTime;
              result.StartTime = Specification.StartTime;
              result.CodeBase = Specification.CodeBase;
              result.LineNumber = Specification.LineNumber;
              result.Column = Specification.Column;
              result.FileName = Specification.FileName;
              result.ClassName = Specification.ClassName;
              result.StackTrace = Specification.StackTrace;

              return result;
        }