Inheritance: AssertEqualsListener, ThrowableCaughtListener
Exemple #1
0
        public ProcessingResult Process(Resource resource)
        {
            var eventRecorder = new EventRecorder();

            this.Target = new StubTarget();

            var concordionBuilder = new ConcordionBuilder()
                                    .withEvaluatorFactory(this.EvaluatorFactory)
                                    .withIOUtil(new IOUtil())
                                    .withSource(this.Source)
                                    .withTarget(this.Target)
                                    .withAssertEqualsListener(eventRecorder)
                                    .withThrowableListener(eventRecorder);

            if (this.Fixture != null)
            {
                new ExtensionLoader(this.Configuration).AddExtensions(this.Fixture, concordionBuilder);
            }

            if (this.Extension != null)
            {
                this.Extension.addTo(concordionBuilder);
            }

            var concordion = concordionBuilder.build();

            ResultSummary resultSummary = concordion.process(resource, this.Fixture);
            string        xml           = this.Target.GetWrittenString(resource);

            return(new ProcessingResult(resultSummary, eventRecorder, xml));
        }
Exemple #2
0
        public ProcessingResult Process(Resource resource)
        {
            var eventRecorder = new EventRecorder();
            this.Target = new StubTarget();

            var concordionBuilder = new ConcordionBuilder()
                .withEvaluatorFactory(this.EvaluatorFactory)
                .withIOUtil(new IOUtil())
                .withSource(this.Source)
                .withTarget(this.Target)
                .withAssertEqualsListener(eventRecorder)
                .withThrowableListener(eventRecorder);

            if (this.Fixture != null)
            {
                new ExtensionLoader(this.Configuration).AddExtensions(this.Fixture, concordionBuilder);
            }

            if (this.Extension != null)
            {
                this.Extension.addTo(concordionBuilder);
            }

            var concordion = concordionBuilder.build();

            ResultSummary resultSummary = concordion.process(resource, this.Fixture);
            string xml = this.Target.GetWrittenString(resource);
            return new ProcessingResult(resultSummary, eventRecorder, xml);
        }
Exemple #3
0
        public ProcessingResult Process(Resource resource)
        {
            var eventRecorder = new EventRecorder();
            this.Target = new StubTarget();

            var concordionBuilder = new ConcordionBuilder()
                .WithEvaluatorFactory(this.EvaluatorFactory)
                .WithSource(this.Source)
                .WithTarget(this.Target)
                .WithAssertEqualsListener(eventRecorder)
                .WithExceptionListener(eventRecorder);

            if (this.Fixture != null)
            {
                new ExtensionLoader(this.Configuration).AddExtensions(this.Fixture, concordionBuilder);
            }

            if (this.Extension != null)
            {
                this.Extension.AddTo(concordionBuilder);
            }

            var concordion = concordionBuilder.Build();

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

            var concordionBuilder = new ConcordionBuilder()
                .WithEvaluatorFactory(this.EvaluatorFactory)
                .WithSource(this.Source)
                .WithTarget(this.Target)
                .WithAssertEqualsListener(eventRecorder)
                .WithExceptionListener(eventRecorder);

            if (this.Fixture != null)
            {
                new ExtensionLoader(this.Configuration).AddExtensions(this.Fixture, concordionBuilder);
            }
            
            if (this.Extension != null)
            {
                this.Extension.AddTo(concordionBuilder);
            }

            var concordion = concordionBuilder.Build();

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