public void Establish() { _tasksDAO = new Tasks.Adapters.DataAccess.TasksDAO(); _tasksDAO.Clear(); _cmd = new CompleteTaskCommand(TASK_ID, _COMPLETION_DATE); _commandProcessor = A.Fake <IAmACommandProcessor>(); A.CallTo(() => _commandProcessor.Post(A <TaskCompletedEvent> ._)); _handler = new CompleteTaskCommandHandler(_tasksDAO, _commandProcessor); }
public void Establish() { _taskToBeCompleted = new Task("My Task", "My Task Description", DateTime.Now); _tasksDAO = new Tasks.Adapters.DataAccess.TasksDAO(); _tasksDAO.Clear(); _taskToBeCompleted = _tasksDAO.Add(_taskToBeCompleted); _cmd = new CompleteTaskCommand(_taskToBeCompleted.Id, s_COMPLETION_DATE); s_commandProcessor = A.Fake <IAmACommandProcessor>(); _handler = new CompleteTaskCommandHandler(_tasksDAO, s_commandProcessor); }