本文整理匯總了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);
}