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