Example #1
0
 public CompleteTaskCommand(int taskId, DateTime completionDate, ITasksDAO tasksDAO, ILog logger)
     : base(Guid.NewGuid())
 {
     this.taskId         = taskId;
     this.completionDate = completionDate;
     this.tasksDAO       = tasksDAO;
     this.logger         = logger;
 }
Example #2
0
 public TaskEndPointHandler(ITaskRetriever taskRetriever, ITaskListRetriever taskListRetriever, ICommunicationContext communicationContext, ITasksDAO tasksDAO, ILog logger)
 {
     this.taskRetriever        = taskRetriever;
     this.taskListRetriever    = taskListRetriever;
     this.communicationContext = communicationContext;
     tasksDao    = tasksDAO;
     this.logger = logger;
 }
Example #3
0
 public AddTaskCommand(string taskName, string taskDescription, DateTime?dueDate, ITasksDAO tasksDAO, ILog logger)
     : base(Guid.NewGuid())
 {
     this.tasksDAO        = tasksDAO;
     this.logger          = logger;
     this.taskName        = taskName;
     this.taskDescription = taskDescription;
     taskDueDate          = dueDate;
 }
Example #4
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);
        }
Example #6
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);
        }
Example #8
0
 public EditTaskCommandHandler(ITasksDAO tasksDAO, ILog logger) : base(logger)
 {
     this.tasksDAO = tasksDAO;
 }
 public CompleteTaskCommandHandler(ITasksDAO tasksDAO, IAmACommandProcessor commandProcessor)
     : this(tasksDAO, commandProcessor, LogProvider.GetCurrentClassLogger())
 {
 }
Example #10
0
 public CompleteTaskCommandHandler(ITasksDAO tasksDao)
 {
     tasksDAO = tasksDao;
 }
 public CompleteTaskCommandHandler(ITasksDAO tasksDao, ILog logger) : base(logger)
 {
     tasksDAO = tasksDao;
 }
Example #12
0
 public TaskRetriever(ITasksDAO tasksDAO)
 {
     _tasksDao = tasksDAO;
 }
Example #13
0
 public TaskListRetriever(ICommunicationContext context, ITasksDAO tasksDAO)
     : this(context.ApplicationBaseUri.Host, tasksDAO)
 {
 }
Example #14
0
 public AddTaskCommandHandler(ITasksDAO tasksDAO, IAmACommandProcessor commandProcessor, ILog logger)
     : base(logger)
 {
     _tasksDAO         = tasksDAO;
     _commandProcessor = commandProcessor;
 }
 public AddTaskCommandHandler(ITasksDAO tasksDAO)
 {
     this.tasksDAO = tasksDAO;
 }
Example #16
0
 //TODO: fix host name
 public TaskListRetriever(ITasksDAO tasksDAO)
 {
     _hostName = "http://localhost/api";
     _tasksDao = tasksDAO;
 }
Example #17
0
 public TaskReminderEndpointHandler(ITasksDAO tasksDAO, ILog logger)
 {
     tasksDao    = tasksDAO;
     this.logger = logger;
 }
Example #18
0
 public AddTaskCommandHandler(ITasksDAO tasksDAO, IAmACommandProcessor commandProcessor)
     : this(tasksDAO, commandProcessor, LogProvider.For <AddTaskCommandHandler>())
 {
 }
 public TaskViewModelRetriever(ITasksDAO tasksDao)
 {
     this.tasksDao = tasksDao;
 }
Example #20
0
 //TODO: fix host name
 public TaskListRetriever(ITasksDAO tasksDAO)
 {
     _hostName = "http://localhost/api";
     _tasksDao = tasksDAO;
 }
Example #21
0
 public TaskRetriever(ITasksDAO tasksDAO)
 {
     _tasksDao = tasksDAO;
 }
Example #22
0
 public TaskListRetriever(string hostName, ITasksDAO tasksDAO)
 {
     _hostName = hostName;
     _tasksDao = tasksDAO;
 }
Example #23
0
 public TaskListRetriever(ICommunicationContext context, ITasksDAO tasksDAO)
     : this(context.ApplicationBaseUri.Host, tasksDAO)
 {
 }
Example #24
0
 public EditTaskCommandHandler(ITasksDAO tasksDAO, IAmACommandProcessor commandProcessor)
 {
     _tasksDAO         = tasksDAO;
     _commandProcessor = commandProcessor;
 }
Example #25
0
 public TaskListRetriever(string hostName, ITasksDAO tasksDAO)
 {
     _hostName = hostName;
     _tasksDao = tasksDAO;
 }
Example #26
0
 public AddTaskCommandHandler(ITasksDAO tasksDAO, ILog logger) : base(logger)
 {
     _tasksDAO = tasksDAO;
 }
Example #27
0
 public TaskViewModelRetriever(ITasksDAO tasksDao)
 {
     this.tasksDao = tasksDao;
 }