public void GetAllPublicPostsTest() { adminsPostRepository .Setup(post => post.GetAllPublic()) .Returns(adminsPostsPublic); adminsPostService = new AdminsPostService(theaterScheduleUnitOfWork.Object, adminsPostRepository.Object); List <AdminsPost> posts = mapper.Map <List <AdminsPostDTO>, List <AdminsPost> >(adminsPostService.GetAllPublicPosts().ToList()); CollectionAssert.AreEqual(adminsPostsPublic, posts, new AdminsPostComparer()); }
public ActionResult <IEnumerable <AdminsPostDTO> > GetAllPublicPosts() { return(Ok(adminsPostService.GetAllPublicPosts())); }