Example #1
0
        public async Task LikePostAndCancelLikeAndCheckIfItIsNotLiked(bool isLike)
        {
            PostService service = await Helpers.GetService(true);

            await service.Rate("post-1", new RateDto { IsLike = isLike });

            await service.CancelRate("post-1");

            Post post = await service.Get("post-1");

            int actualLikes    = post.Likes;
            int actualDislikes = post.Dislikes;

            Assert.AreEqual(0, actualLikes);
            Assert.AreEqual(0, actualDislikes);
        }