Exemple #1
0
        public TypedValue Check(CellOperationValue actualValue, Tree<Cell> expectedCell) {
            var value = actualValue.GetActual(Processor);
            Processor.Get<Symbols>().Save(expectedCell.Value.Content.Substring(2), value);

            expectedCell.Value.SetAttribute(CellAttribute.InformationSuffix, value == null ? "null" : value.ToString());
            return TypedValue.Void;
        }
        public TypedValue Check(CellOperationValue actualValue, Tree <Cell> expectedCell)
        {
            var cell    = (Parse)expectedCell.Value;
            var matcher = new ListMatcher(Processor, new ArrayMatchStrategy(Processor, cell.Parts.Parts));

            matcher.MarkCell(actualValue.GetActual <IEnumerable>(Processor).Cast <object>(), cell.Parts, 0); //todo: encapsulate part in celloperationcontext??
            return(TypedValue.Void);
        }
Exemple #3
0
        public TypedValue Check(CellOperationValue actualValue, Tree<Cell> expectedCell)
        {
            var value = actualValue.GetActual(Processor);
            var symbol = new Symbol(expectedCell.Value.Text.Substring(2), value);
            Processor.Store(symbol);

            expectedCell.Value.AddToAttribute(CellAttribute.InformationSuffix, value == null ? "null" : value.ToString());
            return TypedValue.Void;
        }
        public TypedValue Check(CellOperationValue actualValue, Tree <Cell> expectedCell)
        {
            var    cell          = (Parse)expectedCell.Value;
            var    expectedTable = new FixtureTable(cell.Parts);
            var    tables        = actualValue.GetActual <Parse>(Processor);
            var    actualTable   = new FixtureTable(tables);
            string differences   = actualTable.Differences(expectedTable);

            if (differences.Length == 0)
            {
                Processor.TestStatus.MarkRight(expectedCell.Value);
            }
            else
            {
                Processor.TestStatus.MarkWrong(expectedCell.Value, differences);
                cell.More = new Parse("td", string.Empty, tables, null);
            }
            return(TypedValue.Void);
        }