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

            cell.SetAttribute(CellAttribute.Label, "missing");
            TestStatus.MarkWrong(cell);
        }
コード例 #2
0
 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");
 }
コード例 #6
0
        protected void Wrong(int row, int column, string actual)
        {
            Parse cell = rows.At(row, column);

            TestStatus.MarkWrong(cell, actual);
        }
コード例 #7
0
        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);
 }