public void Update(ListUpdateOptions options)
        {
            listService.Update(options);

            var list = listService.Get(new ListGetQuery(options.Id, LibraryApplicationType.Id)
            {
                Url = options.Url
            });

            ExpireTags(list.GroupId);
        }
Esempio n. 2
0
        public IActionResult GetList([FromQuery] Guid listId, [FromQuery] Guid boardId)
        {
            var listEntity = _listService.Get(listId);
            var listDto    = _mapper.Map <ListDto>(listEntity);

            foreach (var cardDto in listDto.Cards)
            {
                var cardCoverInfo = _cardService.GetCardCoverInfo(boardId, cardDto.Id);
                cardDto.CoverImagePath        = cardCoverInfo.Item1;
                cardDto.CoverImageOrientation = cardCoverInfo.Item2;
            }

            return(Ok(listDto));
        }
        public void Setup()
        {
            //Mock Service interface
            data        = TestData.TodoListData();
            listService = Substitute.For <IListService>();
            listService.Get().Returns(data);
            listService.Get("1").Returns(data[0]);
            listService.Get("3").ReturnsNull();

            newList = new ToDoList
            {
                Id    = "3",
                Name  = "Hobby",
                Items = new List <Item> {
                    new Item {
                        Id = 0, Name = "Buy parts", IsChecked = false
                    }
                }
            };
            //listService.When(x => x.Create(default)).DoNotCallBase();
            //listService.Update(Arg.Any<string>(), Arg.Any<ToDoList>()).ReturnsNull();
            //listService.Remove(Arg.Any<ToDoList>()).ReturnsNull();
            //listService.Remove(Arg.Any<string>()).ReturnsNull();
        }
 public IApplication Get(Guid listUniqueId)
 {
     return(listService.Get(new SPListGetOptions(listUniqueId)));
 }
Esempio n. 5
0
 public ActionResult <List <ToDoList> > Get() =>
 listService.Get();