Record() public method

public Record ( System.Result result ) : void
result System.Result
return void
        public IResultSummary Run(object fixture)
        {
            try
            {
                this.m_Fixture = fixture;
                this.m_Source = new EmbeddedResourceSource(fixture.GetType().Assembly);
                this.m_SpecificationConfig = new SpecificationConfig().Load(fixture.GetType());
                this.m_Target = new FileTarget(m_SpecificationConfig.BaseOutputDirectory);

                var fileExtensions = m_SpecificationConfig.SpecificationFileExtensions;
                if (fileExtensions.Count > 1)
                {
                    return RunAllSpecifications(fileExtensions);
                }
                else if (fileExtensions.Count == 1)
                {
                    return RunSingleSpecification(fileExtensions.First());
                }
                else
                {
                    throw new InvalidOperationException(string.Format("no specification extensions defined for: {0}", this.m_SpecificationConfig));
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                var exceptionResult = new SummarizingResultRecorder();
                exceptionResult.Record(Result.Exception);
                return exceptionResult;
            }
        }
 private IResultSummary RunAllSpecifications(IEnumerable<string> fileExtensions)
 {
     var testSummary = new SummarizingResultRecorder();
     var anySpecExecuted = false;
     foreach (var fileExtension in fileExtensions)
     {
         var specLocator = new ClassNameBasedSpecificationLocator(fileExtension);
         var specResource = specLocator.LocateSpecification(m_Fixture);
         if (m_Source.CanFind(specResource))
         {
             var fixtureResult = RunSingleSpecification(fileExtension);
             AddToTestResults(fixtureResult, testSummary);
             anySpecExecuted = true;
         }
     }
     if (!anySpecExecuted)
     {
         testSummary.Record(Result.Exception);
         Console.WriteLine("no active specification found for fixture: {0}", m_Fixture.GetType().FullName);
     }
     return testSummary;
 }