public SetVerificationGrammar Grammar() { var grammar = new SetVerificationGrammar(_leafName, _title, _comparer) { Description = _description, Ordered = _ordered }; if (_dataSource != null) { grammar.Before((step, context) => { context.CurrentObject = _dataSource(context); }); } return grammar; }
public void SetUp() { grammar = Fixture.VerifyStringList(() => { throw new NotImplementedException(); }).Titled( "The list of strings should be").LeafNameIs("row").Grammar(); step = new Step("anything").WithChildren("row", new Step(), new Step(), new Step()); var context = new TestContext(); grammar.Execute(step, context); counts = context.Counts; rowResults = context.ResultsFor(step).GetResult<IList<SetRow>>(grammar.LeafName); stepResults = context.ResultsFor(step); }
public SetVerificationGrammar Columns(Action<IDataRowComparer> action) { var comparer = new DataRowComparer(); action(comparer); var grammar = new SetVerificationGrammar(_stepName, _title, comparer) { Description = _description }; if (_dataSource != null) { grammar.Before((step, context) => { context.CurrentObject = _dataSource(context).Rows; }); } return grammar; }