public async Task Create_TasksContainer_Success() { var userId = _context.Users.First().UserId; var tasksContainer = new TasksContainerModel { Name = "testContainer" }; //act var containerId = await _service.AddAsync(userId, tasksContainer); var resultContainer = await _context.TasksContainers.SingleOrDefaultAsync(x => x.ListId == containerId); //assert Assert.AreEqual(tasksContainer.Name, resultContainer.Name); }
public async Task <object> AddContainer([FromBody] TasksContainerModel model, Guid idUser) { return(await _tasksContainerService.AddAsync(idUser, model)); }