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); } } }
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); } } }
private static ArrayList ProcessRows(Parse theRows) { var values = new ValueArray("ditto"); ArrayList results = null; foreach (Parse row in new CellRange(theRows).Cells) { results = new ArrayList(); //values.LoadSource(new CellRange(row.Parts).Cells); foreach (Parse cell in values.GetCells(new CellRange(row.Parts).Cells).Cells) { results.Add(cell.Text); } } return results; }
public override void DoRow(Parse theRow) { try { CheckRowSize(theRow.Parts); for (int j = 0; j < expectedCount; j++) { var memberCells = new List <Parse> { headerCells.At(j) }; foreach (Parse cell in methodSuffixCells.Cells) { memberCells.Add(cell); } Parse expectedCell = theRow.Parts.At(myParameterCount + j + 1); try { CellOperation.Check(GetTargetObject(), new CellRange(memberCells), myValues.GetCells(new CellRange(theRow.Parts, myParameterCount).Cells), expectedCell); } catch (MemberMissingException e) { TestStatus.MarkException(headerCells.At(j), e); TestStatus.MarkIgnore(expectedCell); } catch (IgnoredException) { TestStatus.MarkIgnore(expectedCell); } catch (Exception e) { TestStatus.MarkException(expectedCell, e); } } } catch (Exception e) { TestStatus.MarkException(theRow.Parts, e); } }
public override void DoRow(Parse theRow) { try { CheckRowSize(theRow.Parts); for (int j = 0; j < expectedCount; j++) { var memberCells = new CellTree(); memberCells.AddBranch(headerCells.At(j)); foreach (var suffixCell in methodSuffixCells.Cells) { memberCells.AddBranch(suffixCell); } Parse expectedCell = theRow.Parts.At(myParameterCount + j + 1); try { Processor.Check(GetTargetObject(), memberCells, myValues.GetCells(theRow.Branches.Take(myParameterCount)), expectedCell); } catch (MemberMissingException e) { TestStatus.MarkException(headerCells.At(j), e); TestStatus.MarkIgnore(expectedCell); } catch (IgnoredException) { TestStatus.MarkIgnore(expectedCell); } catch (Exception e) { TestStatus.MarkException(expectedCell, e); } } } catch (Exception e) { TestStatus.MarkException(theRow.Parts, e); } }