Esempio n. 1
0
        public override void DoTable(Parse theTable)
        {
            Parse embeddedTables = GetEmbeddedTables(theTable);
            Parse expectedCell = GetExpectedCell(theTable);

            var writer = new StoryTestCopyWriter();
            var storyTest = new StoryTest(Processor, writer)
                .WithParsedInput(new Parse("div", string.Empty, embeddedTables, null));
            storyTest.Execute(new Service.Service(Processor));

            SetEmbeddedTables(theTable, writer.ResultTables);

            if (expectedCell != null) {
                var actual = new FixtureTable(writer.ResultTables);
                var expected = new FixtureTable(expectedCell.Parts);
                string differences = actual.Differences(expected);
                if (differences.Length == 0) {
                    Right(expectedCell);
                }
                else {
                    Wrong(expectedCell);
                    expectedCell.More = ParseNode.MakeCells(Escape(differences));
                    expectedCell.More.SetAttribute(CellAttribute.Status, TestStatus.Wrong);
                }
            }
        }
Esempio n. 2
0
 public Parse TestResult(Parse theTest) {
     var writer = new StoryTestCopyWriter();
     var storyTest = new StoryTest(Processor, writer)
         .WithParsedInput(new Parse("div", string.Empty, theTest, null));
     storyTest.Execute(new Service.Service(Processor));
     return writer.ResultTables;
 }
Esempio n. 3
0
 public Parse TestResult(Parse theTest) {
     var writer = new StoryTestCopyWriter();
     var storyTest = new StoryTest(Processor, writer)
         .WithParsedInput(new Parse("div", string.Empty, theTest, null));
     storyTest.Execute(new Service.Service(Processor));
     return writer.ResultTables;
 }
Esempio n. 4
0
        public override void DoTable(Parse theTable)
        {
            Parse embeddedTables = GetEmbeddedTables(theTable);
            Parse expectedCell   = GetExpectedCell(theTable);

            var writer    = new StoryTestCopyWriter();
            var storyTest = new StoryTest(new Parse("div", string.Empty, embeddedTables, null), writer);

            storyTest.Execute(Processor.Configuration);

            SetEmbeddedTables(theTable, writer.ResultTables);

            if (expectedCell != null)
            {
                var    actual      = new FixtureTable(writer.ResultTables);
                var    expected    = new FixtureTable(expectedCell.Parts);
                string differences = actual.Differences(expected);
                if (differences.Length == 0)
                {
                    Right(expectedCell);
                }
                else
                {
                    Wrong(expectedCell);
                    expectedCell.More = ParseNode.MakeCells(Escape(differences));
                    expectedCell.More.SetAttribute(CellAttribute.Status, TestStatus.Wrong);
                }
            }
        }
 public Parse TestResult(Parse theTest)
 {
     var writer = new StoryTestCopyWriter();
     var story = new StoryTest(new Parse("div", string.Empty, theTest, null), writer);
     story.Execute(Processor.Configuration);
     return writer.ResultTables;
 }
Esempio n. 6
0
        public Parse TestResult(Parse theTest)
        {
            var writer = new StoryTestCopyWriter();
            var story  = new StoryTest(new Parse("div", string.Empty, theTest, null), writer);

            story.Execute(Processor.Configuration);
            return(writer.ResultTables);
        }