public async Task CheckingIfClientLikeTheArticleAsync() { ApplicationDbContext db = GetDb(); var repository = new EfDeletableEntityRepository <Article>(db); var clientArticleLikesRepository = new EfRepository <ClientArticleLike>(db); var service = new ArticlesService( repository, this.commentsRepository.Object, clientArticleLikesRepository, this.cloudinaryService.Object); string articleId = await this.GetArticleAsync(service); var likeCase = await service.LikeArticleAsync(articleId, this.client.Id); var isFavourite = await service.CheckFavouriteArticlesAsync(articleId, this.client.Id); var dislikeCase = await service.LikeArticleAsync(articleId, this.client.Id); Assert.True(likeCase); Assert.True(isFavourite); Assert.True(!dislikeCase); }