public void execute_the_method_with_a_step_and_store_the_actual() { MethodInfo method = ReflectionHelper.GetMethod<ReflectionTarget>(x => x.GetNameAndAge("", 0)); var grammar = new ValueCheckMethod(method, new ReflectionTarget()); Step step = new Step("a").With("name", "Jeremy").With("age", 34); grammar.Execute(step).Results.ActualDisplay<string>(method.GetReturnValueAlias()).ShouldEqual("Jeremy is 34"); }
public void marks_the_testdata_with_right_if_the_actual_matches_the_expected() { MethodInfo method = ReflectionHelper.GetMethod<ReflectionTarget>(x => x.GetNameAndAge("", 0)); var grammar = new ValueCheckMethod(method, new ReflectionTarget()); Step step = new Step("a").With("name", "Jeremy").With("age", 34).With("theValue", "Jeremy is 34"); var data = new TestContext(); grammar.Execute(step, data); data.Counts.Rights.ShouldEqual(1); }