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 AdminsPostController(IAdminsPostService adminsPostService, IPushNotificationsService pushNotificationsService) { this.adminsPostService = adminsPostService; this.pushNotificationsService = pushNotificationsService; }