public void with_set_child() { theParagraph.AddChild(new Sentence { format = "Go left" }); theParagraph.AddChild(new Sentence { format = "Go right" }); var @set = new SetVerification { title = "Some Table", cells = new Cell[] { new Cell { Key = "One" }, new Cell { Key = "Two" }, new Cell { Key = "Three" }, } }; theParagraph.AddChild(@set); var code = theParagraph.ToMissingCode(); code.ShouldContain(@" [StoryTeller.Hidden] public StoryTeller.IGrammar TheParagraph_3() { return VerifySetOf(getTheParagraph_3Rows)"); }
public void SetVerification(SetVerification verification, IStep step) { withNewLeaf(step, Icon.SetVerification, node => { node.AddText(verification.Label); addRearrangeCommands(node); }); }
void ITestStream.SetVerification(SetVerification verification, IStep step) { var container = _document.Current.JoinTagAtEnd <TableContainerTag>(); var tag = new StoryTellerTableTag(verification, step); tag.WritePreview(_context); container.Add(verification.Label, tag); }
private IReaderMode buildSet(bool ordered) { _hasAdded = true; var set = new SetVerification { key = _key, title = _title, ordered = ordered }; _adder(set); return(new TableMode(set)); }
public void when_writing_the_grammar_structure() { SetVerificationGrammar grammar = Fixture.VerifySetOf(c => new ValidationError[0]) .Titled("the title") .LeafNameIs("group1") .MatchOn(x => x.Field, x => x.Message); var setVerification = grammar.ToStructure(null).ShouldBeOfType <SetVerification>(); var expected = new SetVerification("the title", "group1", Cell.For <string>("Field"), Cell.For <string>("Message")); setVerification.ShouldEqual(expected); }
protected override void theContextIs() { step = new Step().With("x", 1).With("y", 2); treeBuilder.StartTest(theTest); section = new Section("Math"); treeBuilder.StartTest(theTest); treeBuilder.StartSection(section, new FixtureGraph("Math")); set = new SetVerification("the label of this grammar", "leaf1"); treeBuilder.SetVerification(set, step); }
public void WriteSetVerificationResults(SetVerification verification, ITestContext context) { if (verification.Ordered) { _headerRow.InsertFirst(new HtmlTag("th").Text("Order")); } var results = context.ResultsFor(_step); results.ForExceptionText(writeExceptionText); var rows = results.GetResult <IList <SetRow> >(_table.LeafName) ?? new List <SetRow>(); // TODO -- order this the right way rows.Each(x => { writeVerificationResultRow(x, context, verification.Ordered); }); _headerRow.FirstChild().AddClass("left-cell"); }
public void with_set_child() { theParagraph.AddChild(new Sentence { format = "Go left" }); theParagraph.AddChild(new Sentence { format = "Go right" }); var @set = new SetVerification { title = "Some Table", cells = new Cell[] { new Cell { Key = "One" }, new Cell { Key = "Two" }, new Cell { Key = "Three" }, } }; theParagraph.AddChild(@set); var code = theParagraph.ToMissingCode(); code.ShouldContain(@" [StoryTeller.Hidden] public StoryTeller.IGrammar TheParagraph_3() { return VerifySetOf(getTheParagraph_3Rows)"); }
void IGrammarVisitor.SetVerification(SetVerification setVerification, IStep step) { add(setVerification.Name, setVerification.Label, Icon.SetVerification); }
void IGrammarVisitor.SetVerification(SetVerification setVerification, IStep step) { writeTable(setVerification); }
void ITestStream.SetVerification(SetVerification verification, IStep step) { markGrammar(verification.Name); }
void IGrammarVisitor.SetVerification(SetVerification setVerification, IStep step) { _link.Label(setVerification.Label); }