public void the_dependency_function_invokes_the_correct_function() { var func = theObjectDef.Dependencies.First().ShouldBeOfType <ValueDependency>() .Value.ShouldBeOfType <Func <ControllerTarget, Model1> >(); var target = new ControllerTarget(); func(target).Name.ShouldEqual("ZeroInOneOut"); }
public void the_dependency_function_invokes_the_correct_function() { var func = theObjectDef.Dependencies.First().ShouldBeOfType <ValueDependency>() .Value.ShouldBeOfType <Func <ControllerTarget, Task <Model2> > >(); var target = new ControllerTarget(); var task = func(target); task.RunSynchronously(); task.Result.Name.ShouldEqual("ZeroInTaskWithOutputOut"); }
public void the_dependency_function_invokes_the_correct_function() { var func = theObjectDef.Dependencies.First().ShouldBeOfType <ValueDependency>() .Value.ShouldBeOfType <Func <ControllerTarget, Model1, Model2> >(); var target = new ControllerTarget(); func(target, new Model1 { Name = "Jeremy" }).Name.ShouldEqual("Jeremy"); }
public void the_dependency_function_invokes_the_correct_function() { var func = theObjectDef.Dependencies.First().ShouldBeOfType <ValueDependency>() .Value.ShouldBeOfType <Func <ControllerTarget, Model1, Task> >(); var target = new ControllerTarget(); var task = func(target, new Model1 { Name = "Corey" }); task.RunSynchronously(); target.LastNameEntered.ShouldEqual("Corey"); }
public void the_dependency_function_invokes_the_correct_function() { var func = theObjectDef.Dependencies.First().ShouldBeOfType<ValueDependency>() .Value.ShouldBeOfType<Func<ControllerTarget, Model1>>(); var target = new ControllerTarget(); func(target).Name.ShouldEqual("ZeroInOneOut"); }
public void the_dependency_function_invokes_the_correct_function() { var func = theObjectDef.Dependencies.First().ShouldBeOfType<ValueDependency>() .Value.ShouldBeOfType<Action<ControllerTarget, Model1>>(); var target = new ControllerTarget(); func(target, new Model1 { Name = "Jeremy" }); target.LastNameEntered.ShouldEqual("Jeremy"); }