public void GetMyLinksTest() { int id = 29; MyLink testLink = new MyLink { MyLinkId = 29 }; List <MyLink> myTestLinks = new List <MyLink>(); myTestLinks.Add(testLink); _mockMyLinksRepository.Setup(x => x.GetMyLinks()).Returns(myTestLinks); var myLinks = _sut.GetMyLinks().ToList <MyLink>(); Assert.Single(myLinks); }
public ActionResult <IEnumerable <MyLinkReadDTO> > Get() { var myLinks = _myLinksService.GetMyLinks(); return(Ok(_mapper.Map <IEnumerable <MyLinkReadDTO> >(myLinks))); }