本文整理汇总了C#中StoryTeller.Domain.Step.LeafFor方法的典型用法代码示例。如果您正苦于以下问题:C# Step.LeafFor方法的具体用法?C# Step.LeafFor怎么用?C# Step.LeafFor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StoryTeller.Domain.Step
的用法示例。
在下文中一共展示了Step.LeafFor方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: step_childstepsfor_is_wired_up
public void step_childstepsfor_is_wired_up()
{
var step = new Step();
var child = new Step();
step.LeafFor("record").Add(child);
step.LeafFor("record").AllSteps().ShouldContain(child);
step.LeafFor("something else").AllSteps().ShouldNotContain(child);
}
示例2: execute_runs_the_child_steps_within_the_fixture
public void execute_runs_the_child_steps_within_the_fixture()
{
string sectionName = typeof(ArithmeticFixture).GetFixtureAlias();
Step step = new Step().WithChildren(sectionName, new Step(), new Step(), new Step());
var context = MockRepository.GenerateMock<ITestContext>();
new EmbeddedSectionGrammar<ArithmeticFixture>().Execute(step, context);
context.AssertWasCalled(
x => x.ExecuteWithFixture<ArithmeticFixture>(step.LeafFor(sectionName), step));
}
示例3: SetUp
public void SetUp()
{
step = new Step();
StepLeaf leaf = step.LeafFor("record");
leaf.Add(new Step().With("a:1,b:2"));
leaf.Add(new Step().With("a:3,b:4"));
leaf.Add(new Step().With("a:5,b:6"));
inner = new RecordingGrammar();
grammar = new TableGrammar(inner.As<IGrammarWithCells>(), "record")
.Before(() => inner.Numbers.Add("0"))
.After(() => inner.Numbers.Add("7"));
grammar.LabelName = "some label";
grammar.Execute(step);
}
示例4: addTest
private void addTest(string name, Action<StepLeaf> configure)
{
var test = new Test(name);
var section = new Section(typeof(SampleTableFixture).GetFixtureAlias());
test.Add(section);
var step = new Step("Table1");
section.Add(step);
var leaf = step.LeafFor("rows");
configure(leaf);
AddTest(name, test);
}