public SuperadminController([FromServices] IUserService userService, ISpecialistService specialistService, ISessionService sessionService, IReviewService reviewService, IProblemService problemService, IProblemImageService problemImageService, IProblemResourceService problemResourceService, IClientVideoReviewService videoReviewService, IFileService fileService, IArticleService articleService, IArticleLikeService articleLikeService, IArticleCommentService articleCommentService, IArticlePublishService articlePublishService) { UserService = userService; SpecialistService = specialistService; SessionService = sessionService; ReviewService = reviewService; ProblemService = problemService; ProblemImageService = problemImageService; ProblemResourceService = problemResourceService; VideoReviewService = videoReviewService; FileService = fileService; ArticleService = articleService; ArticleLikeService = articleLikeService; ArticleCommentService = articleCommentService; ArticlePublishService = articlePublishService; }
public void Init() { _courseService = ServiceFactory.CourseService; _courseTaskService = ServiceFactory.CourseTaskService; _solutionService = ServiceFactory.SolutionService; _reviewService = ServiceFactory.ReviewService; }
public UserController(IUserService userService, IReviewService reviewService, IPurchaseService purchaseService, ICurrentUserService currentUserService) { _userService = userService; _reviewService = reviewService; _purchaseService = purchaseService; _currentUserService = currentUserService; }
public FriendControllerTests() { _friendService = new FriendServiceStub(); _borrowService = new BorrowServiceStub(); _reviewService = new ReviewServiceStub(); _controller = new FriendController(_friendService, _reviewService, _borrowService); }
public ReviewController(IRestaurantService restaurantService, IReviewService reviewService, ILoggingService loggingService, IMapper mapper) { _restaurantService = restaurantService; _reviewService = reviewService; _loggingService = loggingService; _mapper = mapper; }
public ReviewsController( IReviewService reviewService, IMovieService movieService) { this.reviewService = reviewService; this.movieService = movieService; }
public UsersController(IUserService userService, IReviewService reviewService, IRecommendationService recommendationService) { _userService = userService; _reviewService = reviewService; _recommendationService = recommendationService; _userService.OnStart(); }
public List <string> GetReviewsById(string id) { service = DIContainerST.GetInstance().Resolve <IReviewService>(); var user = service.GetReviewsByUserId(id); return(user); }
public OldDescriptionManufacturerFacadeService(IReviewService reviewService, IDateService dateService, IManufacturerRepository manufacturerRepository, IManufacturerFactoryCreation manufacturerFactoryCreation) { _reviewService = reviewService; _dateService = dateService; _manufacturerRepository = manufacturerRepository; _manufacturerFactoryCreation = manufacturerFactoryCreation; }
public IHttpActionResult AddOrUpdate(UserReviewDto user) { user.ApplicationUserId = RequestContext.Principal.Identity.GetUserId(); service = DIContainerST.GetInstance().Resolve <IReviewService>(); service.AddOrUpdateReview(user); return(Ok()); }
public IEnumerable <UserReviewDto> GetAll() { service = DIContainerST.GetInstance().Resolve <IReviewService>(); var user = service.GetAllReviews(); return(user); }
private async Task CreateReview_ShouldWorkFine() { var context = ContextInitializer.InitializeContext(); await this.SeedData(context); this.reviewService = new ReviewService(context); var review = new ProjectReview { ProjectId = "bb2bd817-98cd-4cf3-a80a-53ea0cd9c200", CustomerId = new Guid("cb2bd817-98cd-4cf3-a80a-53ea0cd9c200").ToString(), Review = "Second Review", }; var reviewCreate = new ReviewCreateModel { CustomerId = review.CustomerId, ProjectId = review.ProjectId, Review = "Second Review Text", }; var result = await this.reviewService.CreateReview(reviewCreate); Assert.Equal("Review was successfully created!", result); }
public ListeReviewsPageViewModel(INavigationService navigationService, IReviewService reviewService) : base(navigationService) { Title = "Enregistrements"; _reviewService = reviewService; CommandReviewDetails = new DelegateCommand <ReviewDisplay>(DetailsReview); ReviewsD = new ObservableCollection <ReviewDisplay>(); _isTriRecent = true; CommandEntryRecherche = new DelegateCommand(RechercheTitre); CommandFoodFilter = new DelegateCommand(ChangeFoodFilter); CommandDrinkFilter = new DelegateCommand(ChangeDrinkFilter); CommandToSeeFilter = new DelegateCommand(ChangeToSeeFilter); CommandTriRecent = new DelegateCommand(ChangeTriRecent); CommandTriAncien = new DelegateCommand(ChangeTriAncien); _checkedbox = "@drawable/checkedbox.png"; _uncheckedbox = "@drawable/uncheckedbox.png"; SourceImageButtonDrink = _checkedbox; SourceImageButtonFood = _checkedbox; SourceImageButtonToSee = _checkedbox; SourceImageButtonTriRecent = "@drawable/arrow_up.png"; SourceImageButtonTriAncien = "@drawable/arrow_down_gray.png"; _isDrinkChecked = true; _isFoodChecked = true; _isToSeeChecked = true; }
public AccountController(IUserService userService, IReviewService reviewService, IMemoryCache cache) { _userService = userService; _reviewService = reviewService; _cache = cache; }
internal IFacadeUpdateResult <ReviewData> SaveReview(ReviewInfoDto dto, ReviewObjectTypes type) { ArgumentValidator.IsNotNull("dto", dto); FacadeUpdateResult <ReviewData> result = new FacadeUpdateResult <ReviewData>(); IReviewService service = UnitOfWork.GetService <IReviewService>(); Review instance = RetrieveOrNew <ReviewData, Review, IReviewService>(result.ValidationResult, dto.ReviewId); if (result.IsSuccessful) { instance.ObjectTypeId = (int)type; instance.ObjectId = dto.ObjectId; instance.Rating = dto.Rating; instance.Title = dto.Title; instance.Content = dto.Content; instance.IssuedById = dto.IssuedById; var saveQuery = service.Save(instance); result.AttachResult(instance.RetrieveData <ReviewData>()); result.Merge(saveQuery); } return(result); }
public HomeController() { var context = new ApplicationDbContext(); _reviewService = new ReviewService(new ReviewRepository(context)); _context = context; }
public Application(IRestaurantService restaurantService, IReviewService reviewService, ILoggingService loggingService, IInOut inOut) { this.restaurantService = restaurantService; this.reviewService = reviewService; this.loggingService = loggingService; this.inOut = inOut; }
public ReviewsController(UserManager <User> userManager, IReviewService reviewService, ISupplementService supplementService, IUserService userService) { this.userManager = userManager; this.reviewService = reviewService; this.supplementService = supplementService; this.userService = userService; }
public MovieService(MovieDatabaseDbContext dbContext, IReviewService reviewService, IWatchlistService watchlistService, IMapper mapper) { this.dbContext = dbContext; this.reviewService = reviewService; this.watchlistService = watchlistService; this.mapper = mapper; }
public MoviesController(IMovieService movieService, IPurchaseService purchaseService, IReviewService reviewService, IUserFavoriteService userFavoriteService) { _movieService = movieService; _purchaseService = purchaseService; _reviewService = reviewService; _userFavoriteService = userFavoriteService; }
public UserController(IUserService userService, IOutloanService outloanService, IReviewService reviewService, IRecommendationService recommendationService) { _userService = userService; _outloanService = outloanService; _reviewService = reviewService; _recommendationService = recommendationService; }
public async Task RestaurantRatingChanged(int idRestaurant, decimal newRating) { var newRatingEvt = new RatingChangedEvent { idRestaurant = idRestaurant }; using (var scope = _serviceScopeFactory.CreateScope()) { IReviewService reviewService = scope.ServiceProvider.GetRequiredService <IReviewService>(); var restaurantReviews = await reviewService.GetRestaurantReviews(idRestaurant); newRatingEvt.averageRating = restaurantReviews.Sum(rw => rw.Rating) / restaurantReviews.Count(); } using (var connection = cFactory.CreateConnection()) using (var channel = connection.CreateModel()) { IBasicProperties props = channel.CreateBasicProperties(); props.Type = nameof(RatingChangedEvent); var body = MessageSerializationHelper.SerializeObjectToBin(newRatingEvt); channel.BasicPublish(exchange: string.Empty, routingKey: ApplicationEvents.RestaurantQueue, basicProperties: props, body: body); } }
public HomeController(IGameSearchService gamesSearchService, IReviewService reviewService, IPostService postService, IGameProductService gameProductService) { this.gamesSearchService = gamesSearchService; this.reviewService = reviewService; this.postService = postService; this.gameProductService = gameProductService; }
public ReviewController(IReviewService reviewService, IMapper mapper, ICustomerService customerService, ISpecialistService specialistService) { _reviewService = reviewService; _mapper = mapper; _customerService = customerService; _specialistService = specialistService; }
public HomeController() { var context = new ApplicationDbContext(); _reviewService = new ReviewService(new ReviewRepository(context)); _context = context; }
public async Task RiderRatingChanged(int idRider, decimal newRating) { var newRatingEvt = new RiderRatingChangedEvent { IdRider = idRider }; using (var scope = _serviceScopeFactory.CreateScope()) { IReviewService reviewService = scope.ServiceProvider.GetRequiredService <IReviewService>(); var riderReviews = await reviewService.GetRiderReviews(idRider); newRatingEvt.newAverageRating = riderReviews.Sum(rw => rw.Rating) / riderReviews.Count(); } IBasicProperties props = _channel.CreateBasicProperties(); props.Type = nameof(RiderRatingChangedEvent); var body = MessageSerializationHelper.SerializeObjectToBin(newRatingEvt); _channel.BasicPublish(exchange: string.Empty, routingKey: ApplicationEvents.DeliveryQueue, basicProperties: props, body: body); }
public ReviewServiceTest() { goodBooksContext = GetDbContext(); mapper = GetMapper(); reviewService = new ReviewService(goodBooksContext, mapper); }
public PublishReviewCommand(ICustomerService userService, IReviewService reviewService, ICompanyService companyService) { this.userService = userService; this.reviewService = reviewService; this.companyService = companyService; }
public ReviewsController( IReviewService reviewService, IRecipeService recipeService) { this.reviewService = reviewService; this.recipeService = recipeService; }
public ProductController( IPromotionService promotionService, IContentLoader contentLoader, IPriceService priceService, ICurrentMarket currentMarket, CurrencyService currencyservice, IRelationRepository relationRepository, AppContextFacade appContext, UrlResolver urlResolver, FilterPublished filterPublished, LanguageResolver languageResolver, IsInEditModeAccessor isInEditModeAccessor, IReviewService reviewService) { _promotionService = promotionService; _contentLoader = contentLoader; _priceService = priceService; _currentMarket = currentMarket; _currencyservice = currencyservice; _relationRepository = relationRepository; _appContext = appContext; _urlResolver = urlResolver; _languageResolver = languageResolver; _isInEditMode = isInEditModeAccessor(); _filterPublished = filterPublished; _reviewService = reviewService; }
public UserLocatableReviewsController(IReviewService reviewService, ILocatableService locatableService, IUserProfileService userProfileService, IMapper mapper) { _reviewService = reviewService; _locatableService = locatableService; _userProfileService = userProfileService; _mapper = mapper; }
public PageRatingController() { _reviewService = ServiceLocator.Current.GetInstance<IReviewService>(); _loader = ServiceLocator.Current.GetInstance<IContentLoader>(); contentAssetHelper = ServiceLocator.Current.GetInstance<ContentAssetHelper>(); _repository = ServiceLocator.Current.GetInstance<IContentRepository>(); _urlResolver = ServiceLocator.Current.GetInstance<UrlResolver>(); //_logger = logger; }
public ProductController( IDeepZoomService deepZoomService, ISolrSearchService searchService, IBasketService basketService, IReviewService reviewService) { this.deepZoomService = deepZoomService; this.searchService = searchService; this.basketService = basketService; this.reviewService = reviewService; }
public ProfileService(IProfileRepository profileRepository, IProfileActivityRepository profileActivityRepository, ICredentialService credentialService, IActivityTypeRepository activityTypeRepository, IGrunkerRepository grunkRepository, IPictureService pictureService, IPictureRepository pictureRepository, IReviewService reviewService, IProductService productService) { this.ProfileRepository = profileRepository; this.CredentialService = credentialService; this.ProfileActivityRepository = profileActivityRepository; this.ActivityTypeRepository = activityTypeRepository; this.GrunkRepository = grunkRepository; this.PictureService = pictureService; this.PictureRepository = pictureRepository; this.ReviewService = reviewService; this.ProductService = productService; }
public void Initialize() { listReview = new List<Review>() { new Review() { Id = 1, RestaurantID = 0, UserID = 0, Rating = 1, Comments = "test", DateCreated = DateTime.Now }, new Review() { Id = 2, RestaurantID = 0, UserID = 0, Rating = 1, Comments = "test", DateCreated = DateTime.Now }, new Review() { Id = 3, RestaurantID = 0, UserID = 0, Rating = 1, Comments = "test", DateCreated = DateTime.Now }, }.AsQueryable(); _mockSet = new Mock<DbSet<Review>>(); _mockSet.As<IQueryable<Review>>().Setup(m => m.Provider).Returns(listReview.Provider); _mockSet.As<IQueryable<Review>>().Setup(m => m.Expression).Returns(listReview.Expression); _mockSet.As<IQueryable<Review>>().Setup(m => m.ElementType).Returns(listReview.ElementType); _mockSet.As<IQueryable<Review>>().Setup(m => m.GetEnumerator()).Returns(listReview.GetEnumerator()); _mockContext = new Mock<IRRContext>(); _mockContext.Setup(c => c.Set<Review>()).Returns(_mockSet.Object); _mockContext.Setup(c => c.Reviews).Returns(_mockSet.Object); _service = new ReviewService(_mockContext.Object); }
public ReviewController(IReviewService service) { this.service = service; }
public ProfilesController(IEmployeeService employeeService, IReviewService reviewService) { this.employeeService = employeeService; this.reviewService = reviewService; }
public ReviewController(IDatabaseContext dbContext, IReviewService reviewService) { _db = dbContext; _reviewService = reviewService; }
public ReviewController(IUserService userService, IReviewService reviewService) { this._userService = userService; this._reviewService = reviewService; }
public void Initialize() { this.service = new ReviewService(); //TODO: add review, answer and employee in database for methods being tested here }
public ReviewsController(IReviewService reviewService) { this.ReviewService = reviewService; }
public void Setup() { this._reviewRepository = new Mock<IReviewRepository>(); this._reviewService = new ReviewService(this._reviewRepository.Object); }
public ReviewsController(IReviewService reviewService, IProfileService profileService, IStaticTextService staticTextService) { this.ReviewService = reviewService; this.ProfileService = profileService; this.StaticTextService = staticTextService; }
public void Initialize() { this.service = new ReviewService(); this.initializeTestData(); }
public EntityController(IEntityService entityService, IReviewService reviewService) { this._entityService = entityService; this._reviewService = reviewService; }
public UtilityController(IProductService productService, IProfileService profileService, IReviewService reviewService) { this.ProductService = productService; this.ProfileService = profileService; this.ReviewService = reviewService; }