示例#1
0
 public TasksListTests()
 {
     _sut = new TasksList(Setup.Configuration(c =>
     {
         c.MethodToExecute(m => m.Name == "Execute");
     }));
     _context = Setup.Context();
     _context.RequestedTask = "Build";
     AddClean();
     AddBuild();
     AddDummy();
 }
示例#2
0
        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);
        }