本文整理匯總了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"));
}
示例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();
}
示例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");
}
示例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();
}