コード例 #1
0
        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());
        }
コード例 #2
0
 public ActionResult <IEnumerable <AdminsPostDTO> > GetAllPersonalPosts(int id)
 {
     return(Ok(adminsPostService.GetAllPersonalPosts(id)));
 }