当前位置: 首页>>代码示例>>C#>>正文


C# Domain.Step类代码示例

本文整理汇总了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);
        }
开发者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


注:本文中的StoryTeller.Domain.Step类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。