public void Initialize()
 {
     AutoMapperConfigurator.Configure();
     _repositoryMock = new Mock<IRepository<StoredTaskRequest>>();
     _storedTask = new StoredTaskRequest {}; // TODO insert data 
     _task = new TaskRequest { }; // TODO insert data 
 }
Example #2
0
 /// <summary>
 ///     Updates a task to an unassigned task or a task in progress.
 /// </summary>
 /// <param name="task"></param>
 public void UpdateTaskStatus(TaskRequest task)
 {
     throw new NotImplementedException();
 }
Example #3
0
 /// <summary>
 ///     Add another task to unassigned tasks.
 /// </summary>
 /// <param name="task">
 ///     Task to add to list of unassigned tasks.
 /// </param>
 public void AddTask(TaskRequest task)
 {
     throw new NotImplementedException();
 }
Example #4
0
        /// <summary>
        ///     Method for creating a task with a state matching the given task object's state
        /// </summary>
        /// <param name="task">
        ///     The given task to be created in the database
        /// </param>
        /// <returns>
        ///     A response message indicating the result of the request
        /// </returns>
        public HttpResponseMessage CreateTask(TaskRequest task)
        {
            try
            {
                var taskId = _taskHandler.Create(task).Result;

                return CreateResponse(HttpStatusCode.OK);
            }
            catch (Exception exception)
            {
                return CreateResponse(HttpStatusCode.BadRequest, exception.Message);
            }

        }