本文整理汇总了C#中StoryTeller.Domain.Step类的典型用法代码示例。如果您正苦于以下问题:C# Step类的具体用法?C# Step怎么用?C# Step使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Step类属于StoryTeller.Domain命名空间,在下文中一共展示了Step类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例2: using_a_default_value
public void using_a_default_value()
{
var step = new Step();
grammar2.Execute(step, context);
target.Name.ShouldEqual(grammar2.DefaultValue);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例7: AddStep
public static Step AddStep(this IPartHolder holder, string grammarKey)
{
var step = new Step(grammarKey);
holder.Parts.Add(step);
return step;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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");
}
示例14: SetUp
public void SetUp()
{
_theAddress = null;
grammar = new ParagraphGrammar();
expression = new ObjectConstructionExpression<Address>(grammar);
theStep = new Step();
}
示例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);
}