예제 #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);
            }
        }
예제 #2
0
 public ProcessingResult(IResultSummary resultSummary, EventRecorder eventRecorder, string documentXML)
 {
     this.resultSummary = resultSummary;
     this.eventRecorder = eventRecorder;
     this.documentXML   = documentXML;
 }