Ejemplo n.º 1
0
        public async Task Update_Note_Success()
        {
            var taskId   = _context.Tasks.First().TaskId;
            var userTask = new UserTaskModel()
            {
                TextTask = "Какой то текст",
                EndTime  = DateTime.Now
            };

            //act
            await _service.EditAsync(taskId, userTask);

            var resultTask = await _context.Tasks.SingleOrDefaultAsync(x => x.TaskId == taskId);

            //assert
            Assert.AreEqual(userTask.TextTask, resultTask.TextTask);
            Assert.AreEqual(userTask.EndTime, resultTask.EndTime);
        }
Ejemplo n.º 2
0
 public async Task EditTask([FromBody] UserTaskModel model, Guid idTask)
 {
     await _userTaskService.EditAsync(idTask, model);
 }