public void CallReviewsService_GetBarReviews_WithCorrectId() { //Arrange int barId = 1; string title = "title"; string text = "text"; var reviews = new List <Review>(); var mockedMappingService = new Mock <IMappingService>(); var mockedBarsService = new Mock <IBarsService>(); var mockedReviewsService = new Mock <IReviewsService>(); mockedReviewsService.Setup(x => x.AddReview(It.IsAny <int>(), It.IsAny <Review>())); mockedReviewsService.Setup(x => x.GetBarReviews(It.IsAny <int>())).Returns(reviews); var mockedRatingService = new Mock <IRatingService>(); var mockedUserProvider = new Mock <IUserProvider>(); var controller = new BarController(mockedMappingService.Object, mockedBarsService.Object, mockedReviewsService.Object, mockedRatingService.Object, mockedUserProvider.Object); //Act controller.AddReview(barId, title, text); //Assert mockedReviewsService.Verify(x => x.GetBarReviews(barId), Times.Once()); }