public override void DoRow(Parse theRow) { if (theRow.Parts.More.Size != firstRowCells.Size) { TestStatus.MarkException(theRow.Parts, new RowWidthException(firstRowCells.Size)); return; } Parse headerCell = firstRowCells; foreach (Parse expectedValueCell in new CellRange(theRow.Parts.More).Cells) { try { CellOperation.Check(GetTargetObject(), combineMember, new CellTree(theRow.Parts, headerCell), expectedValueCell); } catch (IgnoredException) { TestStatus.MarkIgnore(expectedValueCell); } catch (Exception e) { TestStatus.MarkException(expectedValueCell, e); } headerCell = headerCell.More; } }
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); } }
protected void ProcessFlowRow(Parse theCurrentRow) { try { string specialActionName = RuntimeDirect.MakeDirect( Processor.ParseTree <Cell, MemberName>(new CellRange(theCurrentRow.Parts, 1)).ToString()); TypedValue result = Processor.Invoke(new FlowKeywords(this), specialActionName, theCurrentRow.Parts); if (!result.IsValid) { result = Processor.Invoke(this, specialActionName, theCurrentRow.Parts); } if (!result.IsValid) { result = CellOperation.TryInvoke(this, new CellRange(MethodCells(new CellRange(theCurrentRow.Parts))), new CellRange(ParameterCells(new CellRange(theCurrentRow.Parts))), theCurrentRow.Parts); } if (!result.IsValid) { if (theCurrentRow.Parts.Text.Length > 0) { var newFixture = Processor.ParseTree <Cell, Interpreter>(theCurrentRow); var adapter = newFixture as MutableDomainAdapter; if (adapter != null) { adapter.SetSystemUnderTest(SystemUnderTest); } ProcessRestOfTable(newFixture, theCurrentRow); IHaveFinishedTable = true; } else { result.ThrowExceptionIfNotValid(); } } else { if (TestStatus.IsAbandoned) { TestStatus.MarkIgnore(theCurrentRow); return; } object wrapResult = FixtureResult.Wrap(result.Value); if (wrapResult is bool) { ColorMethodName(theCurrentRow.Parts, (bool)wrapResult); } else if (wrapResult is Fixture) { ProcessRestOfTable((Fixture)wrapResult, theCurrentRow); IHaveFinishedTable = true; return; } } } catch (IgnoredException) {} catch (ParseException <Cell> e) { TestStatus.MarkException(e.Subject, e); IHaveFinishedTable = true; } catch (Exception e) { TestStatus.MarkException(theCurrentRow.Parts, e); IHaveFinishedTable = true; } }
protected void Ignore(int row, int column) { Parse cell = rows.At(row, column); TestStatus.MarkIgnore(cell); }
public virtual void Ignore(Parse cell) { TestStatus.MarkIgnore(cell); }
public virtual void DoCell(Parse cell, int columnNumber) { TestStatus.MarkIgnore(cell); }