예제 #1
0
        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);
        }
예제 #2
0
 public async Task <object> AddContainer([FromBody] TasksContainerModel model, Guid idUser)
 {
     return(await _tasksContainerService.AddAsync(idUser, model));
 }