public void GetAllPersonalPostsTest() { adminsPostRepository .Setup(post => post.GetAllPersonalById(userId)) .Returns(adminsPostsPersonal); adminsPostService = new AdminsPostService(theaterScheduleUnitOfWork.Object, adminsPostRepository.Object); List <AdminsPost> posts = mapper.Map <List <AdminsPostDTO>, List <AdminsPost> >(adminsPostService.GetAllPersonalPosts(userId).ToList()); CollectionAssert.AreEqual(adminsPostsPersonal, posts, new AdminsPostComparer()); }
public ActionResult <IEnumerable <AdminsPostDTO> > GetAllPersonalPosts(int id) { return(Ok(adminsPostService.GetAllPersonalPosts(id))); }