コード例 #1
0
        public async Task <object> GetTasks(Guid idContainer)
        {
            var tasks = await _userTaskService.GetAsync();

            var result = tasks.Where(x => x.ListId == idContainer);

            return(result.Select(x => x.UserTaskView()));
        }
コード例 #2
0
        public async Task <object> GetTasks()
        {
            var resultList = await _userTaskService.GetAsync();

            var resultMass = await _userTaskService.TasksConvertToXssfAsync(resultList);

            return(File(resultMass, typeXssf, "Tasks.xlsx"));
        }
コード例 #3
0
        public async Task Get_Users_Sueccess()
        {
            //Act
            var taskList = await _service.GetAsync();


            //Assrt
            for (int i = 0; i < _userTasks.Count; i++)
            {
                Assert.AreEqual(_userTasks[i].TextTask, taskList[i].TextTask);
                Assert.AreEqual(_userTasks[i].EndTime, taskList[i].EndTime);
            }
        }