public TasksListTests() { _sut = new TasksList(Setup.Configuration(c => { c.MethodToExecute(m => m.Name == "Execute"); })); _context = Setup.Context(); _context.RequestedTask = "Build"; AddClean(); AddBuild(); AddDummy(); }
public void run_task_without_dependencies() { var context = Setup.Context(); var task = new MyWrapperClass.Clean(); task.Context = context; var method = task.GetType().GetMethod("Execute"); var exec = new TaskExecutor(task, method); exec.Execute(context); Assert.Equal(context.Data["Result"], 23); }