Esempio n. 1
0
        public void Establish()
        {
            _tasksDAO = new Tasks.Adapters.DataAccess.TasksDAO();
            _tasksDAO.Clear();

            _cmd = new AddTaskCommand(TASK_NAME, TASK_DESCRIPTION, _now);

            _commandProcessor = A.Fake <IAmACommandProcessor>();

            _handler = new AddTaskCommandHandler(_tasksDAO, _commandProcessor);
        }
        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);
        }
Esempio n. 3
0
        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);
        }
        public void Establish()
        {
            _taskToBeEdited = new Task("My Task", "My Task Description", DateTime.Now);
            _tasksDAO       = new Tasks.Adapters.DataAccess.TasksDAO();
            _tasksDAO.Clear();
            _taskToBeEdited = _tasksDAO.Add(_taskToBeEdited);

            _cmd = new EditTaskCommand(_taskToBeEdited.Id, NEW_TASK_NAME, NEW_TASK_DESCRIPTION, _NEW_TIME);

            s_commandProcessor = A.Fake <IAmACommandProcessor>();

            _handler = new EditTaskCommandHandler(_tasksDAO, s_commandProcessor);
        }