示例#1
0
        void MarkRowAsMissing(Parse row)
        {
            Parse cell = row.Parts;

            cell.SetAttribute(CellAttribute.Label, "missing");
            TestStatus.MarkWrong(cell);
        }
 public override void DoRow(Parse row)
 {
     if (row.Parts.Size != rowWidth)
     {
         TestStatus.MarkException(row.Parts, new RowWidthException(rowWidth));
     }
     else
     {
         try {
             TypedValue result = Processor.ExecuteWithThrow(this, memberNameCells,
                                                            valueCells.GetCells(row.Branches), row.Parts);
             if (result.Type != typeof(bool))
             {
                 throw new InvalidMethodException("Method does not return boolean.");
             }
             if (result.GetValue <bool>() == expectedCondition)
             {
                 TestStatus.MarkRight(row);
             }
             else
             {
                 TestStatus.MarkWrong(row);
             }
         }
         catch (ParseException <Cell> e) {
             TestStatus.MarkException(e.Subject, e.InnerException);
         }
     }
 }
示例#3
0
 public override void DoRow(Parse row)
 {
     if (row.Parts.Size != rowWidth)
     {
         TestStatus.MarkException(row.Parts, new RowWidthException(rowWidth));
     }
     else
     {
         try {
             TypedValue result = CellOperation.Invoke(this, memberNameCells,
                                                      valueCells.GetCells(new CellRange(row.Parts).Cells), row.Parts);
             if (result.Type != typeof(bool))
             {
                 throw new InvalidMethodException(string.Format("Method does not return boolean."));
             }
             if (result.GetValue <bool>() == expectedCondition)
             {
                 TestStatus.MarkRight(row);
             }
             else
             {
                 TestStatus.MarkWrong(row);
             }
         }
         catch (ParseException <Cell> e) {
             TestStatus.MarkException(e.Subject, e.InnerException);
         }
     }
 }
示例#4
0
        void EvaluateCellsInMatchingRow(Parse row, object match)
        {
            SetTargetObject(match);
            Parse cell = row.Parts;

            foreach (Parse headerCell in new CellRange(headerCells).Cells)
            {
                if (cell == null)
                {
                    cell = new Parse("td", Label("missing"), null, null);
                    TestStatus.MarkWrong(cell);
                    row.Parts.Last.More = cell;
                }
                else
                {
                    CheckCalled();
                    CellOperation.Check(GetTargetObject(), headerCell, cell);
                }
                cell = cell.More;
            }
        }
示例#5
0
 void MarkRowAsSurplus(Parse row)
 {
     TestStatus.MarkWrong(row.Parts);
     row.Parts.SetAttribute(CellAttribute.Label, "surplus");
 }
        protected void Wrong(int row, int column, string actual)
        {
            Parse cell = rows.At(row, column);

            TestStatus.MarkWrong(cell, actual);
        }
        protected void Wrong(int row, int column)
        {
            Parse cell = rows.At(row, column);

            TestStatus.MarkWrong(cell);
        }
示例#8
0
 public virtual void Wrong(Parse cell, string actual)
 {
     TestStatus.MarkWrong(cell, actual);
 }
示例#9
0
 public virtual void Wrong(Parse cell)
 {
     TestStatus.MarkWrong(cell);
 }