Exemple #1
0
        public ProcessingResult Process(Resource resource)
        {
            var eventRecorder = new EventRecorder();
            var stubTarget    = new StubTarget();

            var concordion = new ConcordionBuilder()
                             .WithAssertEqualsListener(eventRecorder)
                             .WithExceptionListener(eventRecorder)
                             .WithSource(Source)
                             .WithEvaluatorFactory(EvaluatorFactory)
                             .WithTarget(stubTarget)
                             .Build();

            try
            {
                IResultSummary resultSummary = concordion.Process(resource, Fixture);
                string         xml           = stubTarget.GetWrittenString(resource);
                return(new ProcessingResult(resultSummary, eventRecorder, xml));
            }
            catch (Exception e)
            {
                throw new Exception("Test rig failed to process specification", e);
            }
        }
Exemple #2
0
 public ProcessingResult(IResultSummary resultSummary, EventRecorder eventRecorder, string documentXML)
 {
     this.resultSummary = resultSummary;
     this.eventRecorder = eventRecorder;
     this.documentXML   = documentXML;
 }