本文整理汇总了C#中StoryTeller.Domain.Step类的典型用法代码示例。如果您正苦于以下问题:C# Step类的具体用法?C# Step怎么用?C# Step使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Step类属于StoryTeller.Domain命名空间,在下文中一共展示了Step类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: simple_valid_case_of_configure_object_working
public void simple_valid_case_of_configure_object_working()
{
Step step = new Step().With("age", 45);
grammar1.Execute(step, context);
target.Age.ShouldEqual(45);
}
开发者ID:adymitruk,项目名称:storyteller,代码行数:7,代码来源:ConfigureObjectGrammarTester.cs
示例2: using_a_default_value
public void using_a_default_value()
{
var step = new Step();
grammar2.Execute(step, context);
target.Name.ShouldEqual(grammar2.DefaultValue);
}
开发者ID:adymitruk,项目名称:storyteller,代码行数:7,代码来源:ConfigureObjectGrammarTester.cs
示例3: execute_with_exceptions
public void execute_with_exceptions()
{
grammar = new ReadGrammar<int>("var", x => { throw new NotImplementedException(); });
Step step = new Step("some grammar").With("var", "1");
grammar.Execute(step).ShouldEqual(0, 0, 1, 0);
}
开发者ID:adymitruk,项目名称:storyteller,代码行数:7,代码来源:ReadGrammarTester.cs
示例4: negative_case_for_select
public void negative_case_for_select()
{
var grammar = grammarForId("select1");
var step = new Step().With("data", "different");
grammar.Execute(step).Counts.ShouldEqual(0, 1, 0, 0);
}
开发者ID:ruizbennett,项目名称:fubumvc,代码行数:7,代码来源:CheckValueGrammarTester.cs
示例5: step_count_of_a_step_with_child_leaves_and_grand_children
public void step_count_of_a_step_with_child_leaves_and_grand_children()
{
Step step = new Step().WithChildren("a", new Step(), new Step(),
new Step().WithChildren("b", new Step()).WithChildren("c", new Step(),
new Step()));
step.StepCount().ShouldEqual(7);
}
开发者ID:wbinford,项目名称:storyteller,代码行数:7,代码来源:StepTester.cs
示例6: execute_happy_path
public void execute_happy_path()
{
Step step = new Step("some grammar").With("var", "13");
grammar.Execute(step).ShouldEqual(0, 0, 0, 0);
whatWasRead.ShouldEqual(13);
}
开发者ID:adymitruk,项目名称:storyteller,代码行数:7,代码来源:ReadGrammarTester.cs
示例7: AddStep
public static Step AddStep(this IPartHolder holder, string grammarKey)
{
var step = new Step(grammarKey);
holder.Parts.Add(step);
return step;
}
开发者ID:abombss,项目名称:storyteller,代码行数:7,代码来源:IPartHolder.cs
示例8: negative_case_with_syntax_error
public void negative_case_with_syntax_error()
{
var grammar = grammarForId("div1");
var step = new Step();
grammar.Execute(step).Counts.ShouldEqual(0, 0, 0, 1);
}
开发者ID:ruizbennett,项目名称:fubumvc,代码行数:7,代码来源:CheckValueGrammarTester.cs
示例9: positive_case_for_select_verifying_by_display
public void positive_case_for_select_verifying_by_display()
{
var grammar = grammarForId("select1");
var step = new Step().With("data", "b");
grammar.Execute(step).Counts.ShouldEqual(1, 0, 0, 0);
}
开发者ID:ruizbennett,项目名称:fubumvc,代码行数:7,代码来源:CheckValueGrammarTester.cs
示例10: negative_case_against_div
public void negative_case_against_div()
{
var grammar = grammarForId("div1");
var step = new Step().With("data", "different text");
grammar.Execute(step).Counts.ShouldEqual(0, 1, 0, 0);
}
开发者ID:ruizbennett,项目名称:fubumvc,代码行数:7,代码来源:CheckValueGrammarTester.cs
示例11: positive_case_against_div
public void positive_case_against_div()
{
var grammar = grammarForId("div1");
var step = new Step().With("data", "the div text");
grammar.Execute(step).Counts.ShouldEqual(1, 0, 0, 0);
}
开发者ID:ruizbennett,项目名称:fubumvc,代码行数:7,代码来源:CheckValueGrammarTester.cs
示例12: 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);
}
开发者ID:adymitruk,项目名称:storyteller,代码行数:8,代码来源:StepTester.cs
示例13: happy_path_creates_the_object_and_puts_it_on_the_TestContext
public void happy_path_creates_the_object_and_puts_it_on_the_TestContext()
{
Step step = new Step().With("name", "Josh");
grammar.Execute(step, context);
context.CurrentObject.ShouldBeOfType<CreateObjectGrammarTarget>()
.Name.ShouldEqual("Josh");
}
开发者ID:GaryLCoxJr,项目名称:storyteller,代码行数:8,代码来源:CreateObjectGrammarTester.cs
示例14: SetUp
public void SetUp()
{
_theAddress = null;
grammar = new ParagraphGrammar();
expression = new ObjectConstructionExpression<Address>(grammar);
theStep = new Step();
}
开发者ID:GaryLCoxJr,项目名称:storyteller,代码行数:9,代码来源:ObjectConstructionExpressionTester.cs
示例15: read_incorrectly_formatted_step_value_increments_syntax_error
public void read_incorrectly_formatted_step_value_increments_syntax_error()
{
Step step = new Step().With("DistanceFromOffice:abc");
var context = new TestContext();
match.ReadExpected(context, step, new SetRow());
context.Counts.ShouldEqual(0, 0, 0, 1);
}
开发者ID:adymitruk,项目名称:storyteller,代码行数:9,代码来源:PropertyMatchTester.cs
示例16: read_correctly_formatted_step_value
public void read_correctly_formatted_step_value()
{
Step step = new Step().With("DistanceFromOffice:112.5");
var row = new SetRow();
match.ReadExpected(new TestContext(), step, row);
row.Values["DistanceFromOffice"].ShouldEqual(112.5);
}
开发者ID:adymitruk,项目名称:storyteller,代码行数:9,代码来源:PropertyMatchTester.cs
示例17: has_checks_the_cache
public void has_checks_the_cache()
{
var step = new Step("a");
step.Has("b").ShouldBeFalse();
step.Set("b", 123);
step.Has("b").ShouldBeTrue();
}
开发者ID:adymitruk,项目名称:storyteller,代码行数:9,代码来源:StepTester.cs
示例18: happy_path_does_not_increment_the_counts
public void happy_path_does_not_increment_the_counts()
{
Step step = new Step().With("name", "Josh");
grammar.Execute(step, context);
context.Counts.ShouldEqual(0, 0, 0, 0);
context.CurrentObject.ShouldBeOfType<CreateObjectGrammarTarget>()
.Name.ShouldEqual("Josh");
}
开发者ID:GaryLCoxJr,项目名称:storyteller,代码行数:9,代码来源:CreateObjectGrammarTester.cs
示例19: accept_a_visitor
public void accept_a_visitor()
{
var visitor = MockRepository.GenerateMock<ITestVisitor>();
var step = new Step("a");
step.AcceptVisitor(visitor);
visitor.AssertWasCalled(x => x.RunStep(step));
}
开发者ID:adymitruk,项目名称:storyteller,代码行数:10,代码来源:StepTester.cs
示例20: write_preview_when_the_cell_value_is_missing_in_the_step
public void write_preview_when_the_cell_value_is_missing_in_the_step()
{
var cell = Cell.For<string>("name");
var step = new Step();
var tag = new CellTag(cell, step);
tag.WritePreview(new TestContext());
tag.Text().ShouldEqual("MISSING");
}
开发者ID:wbinford,项目名称:storyteller,代码行数:10,代码来源:CellTagTester.cs
注:本文中的StoryTeller.Domain.Step类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论