當前位置: 首頁>>代碼示例>>C#>>正文


C# Step.Get方法代碼示例

本文整理匯總了C#中StoryTeller.Domain.Step.Get方法的典型用法代碼示例。如果您正苦於以下問題:C# Step.Get方法的具體用法?C# Step.Get怎麽用?C# Step.Get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在StoryTeller.Domain.Step的用法示例。


在下文中一共展示了Step.Get方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: shallow_clone

        public void shallow_clone()
        {
            Step step = new Step("key").With("a:1,b:2,c:3");
            IStep clone = step.ShallowClone();

            clone.ShouldNotBeTheSameAs(step);
            clone.GrammarKey.ShouldEqual("key");
            clone.Get("a").ShouldEqual(step.Get("a"));
            clone.Get("b").ShouldEqual(step.Get("b"));
            clone.Get("c").ShouldEqual(step.Get("c"));
        }
開發者ID:adymitruk,項目名稱:storyteller,代碼行數:11,代碼來源:StepTester.cs

示例2: execute_successfully

        public void execute_successfully()
        {
            ReflectionAssertion assertion = ReflectionAssertion.Create(x => x.Success(), new AssertionFixture());
            var step = new Step();

            var context = new TestContext();

            assertion.Execute(step, context);
            context.Counts.ShouldEqual(1, 0, 0, 0);

            step.Get("returnValue").Parse<bool>().ShouldBeTrue();
            context.ResultsFor(step).ActualDisplay<bool>("returnValue").ShouldBeTrue();
        }
開發者ID:wbinford,項目名稱:storyteller,代碼行數:13,代碼來源:ReflectionAssertionTester.cs

示例3: execute_with_exception

        public void execute_with_exception()
        {
            ReflectionAssertion assertion = ReflectionAssertion.Create(x => x.Exception(), new AssertionFixture());
            var step = new Step();

            var context = new TestContext();

            assertion.Execute(step, context);
            context.Counts.ShouldEqual(0, 0, 1, 0);

            step.Get("returnValue").Parse<bool>().ShouldBeTrue();
            context.ResultsFor(step).ActualDisplay<bool>("returnValue").ShouldBeFalse();
            context.ResultsFor(step).ExceptionText.ShouldContain("NotImplementedException");
        }
開發者ID:wbinford,項目名稱:storyteller,代碼行數:14,代碼來源:ReflectionAssertionTester.cs

示例4: execute_with_false

        public void execute_with_false()
        {
            FactAssertion assertion = FactAssertion.Create(x => x.Failure(), new AssertionFixture());
            var step = new Step();
            var context = new TestContext();

            assertion.Execute(step, context);
            context.Counts.ShouldEqual(0, 1, 0, 0);

            step.Get("returnValue").Parse<bool>().ShouldBeTrue();
            context.ResultsFor(step).ActualDisplay<bool>("returnValue").ShouldBeFalse();
        }
開發者ID:adymitruk,項目名稱:storyteller,代碼行數:12,代碼來源:ReflectionAssertionTester.cs


注:本文中的StoryTeller.Domain.Step.Get方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。