當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。