public TypedValue Check(CellOperationValue actualValue, Tree<Cell> expectedCell) { var actualCell = Processor.Compose(actualValue.GetTypedActual(Processor)); expectedCell.Value.AddToAttribute(CellAttribute.InformationSuffix, actualCell.Value.Text.Length == 0 ? "blank" : actualCell.Value.Text); // slightly quirky behavior from original fitnesse.net return TypedValue.Void; }
void CheckEventuallyMatches(CellOperationValue actualValue, Tree<Cell> expectedCell) { var wait = Processor.Get<Symbols>().GetValueOrDefault<int>("WaitFor.Time", defaultWaitTime); var maxCount = Processor.Get<Symbols>().GetValueOrDefault<int>("WaitFor.Count", defaultWaitCount); var sleep = 0; TypedValue actual = TypedValue.Void; for (var count = 0; count < maxCount; count++) { Processor.Get<Logging>().BeginCell(expectedCell.Value); try { actual = actualValue.GetTypedActual(Processor); } finally { Processor.Get<Logging>().EndCell(expectedCell.Value); } if (Processor.Compare(actual,expectedCell)) { Processor.TestStatus.MarkRight(expectedCell.Value); return; } var sleepThisTime = (wait*count)/maxCount - sleep; if (sleepThisTime <= 0) continue; Thread.Sleep(sleepThisTime); sleep += sleepThisTime; } var actualCell = Processor.Compose(actual); Processor.TestStatus.MarkWrong(expectedCell.Value, actualCell.Value.Text); }
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) { try { CheckEventuallyMatches(actualValue, expectedCell); } catch (IgnoredException) {} Processor.TestStatus.MarkCellWithLastResults(expectedCell.Value); return TypedValue.Void; }
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) { try { var actual = actualValue.GetTypedActual(Processor); if (Processor.Compare(actual, expectedCell)) { Processor.TestStatus.MarkRight(expectedCell.Value); } else { var actualCell = Processor.Compose(actual); Processor.TestStatus.MarkWrong(expectedCell.Value, actualCell.Value.Text); } } catch (IgnoredException) {} Processor.TestStatus.MarkCellWithLastResults(expectedCell); return TypedValue.Void; }
public bool CanCheck(CellOperationValue actualValue, Tree<Cell> expectedCell) { return true; }
public bool CanCheck(CellOperationValue actualValue, Tree<Cell> expectedCell) { return expectedCell.Value.Text.StartsWith(">>"); }
public bool CanCheck(CellOperationValue actualValue, Tree<Cell> expectedCell) { return expectedCell.Value.Text.Length == 0 && expectedCell.IsLeaf; }
public bool CanCheck(CellOperationValue actualValue, Tree<Cell> expectedCell) { return actualValue.IsVolatile; }