Пример #1
0
 public RestaurantTask(IRepository<ViewRestaurant> viewRestaurantRepository,
     IRepository<RestaurantPhoto> restaurantPhotoRepository,
     IRestaurantRatingTask restaurantRatingTask)
 {
     _viewRestaurantRepository = viewRestaurantRepository;
     _restaurantPhotoRepository = restaurantPhotoRepository;
     _restaurantRatingTask = restaurantRatingTask;
 }
Пример #2
0
 public RestaurantTask(IRepository <ViewRestaurant> viewRestaurantRepository,
                       IRepository <RestaurantPhoto> restaurantPhotoRepository,
                       IRestaurantRatingTask restaurantRatingTask)
 {
     _viewRestaurantRepository  = viewRestaurantRepository;
     _restaurantPhotoRepository = restaurantPhotoRepository;
     _restaurantRatingTask      = restaurantRatingTask;
 }
Пример #3
0
 public RestaurantController(IRestaurantTask restaurantTask, IRestaurantReviewTask restaurantReviewTask,
                             IRestaurantRatingTask restaurantRatingTask, IRestaurantPhotoTask restaurantPhotoTask)
 {
     _restaurantTask       = restaurantTask;
     _restaurantReviewTask = restaurantReviewTask;
     _restaurantRatingTask = restaurantRatingTask;
     _restaurantPhotoTask  = restaurantPhotoTask;
 }
Пример #4
0
 public HomeController(IMappingService mappingService, IRestaurantTask restaurantTask,
                       IRestaurantReviewTask restaurantReviewTask, IRestaurantRatingTask restaurantRatingTask,
                       IRestaurantPhotoTask restaurantPhotoTask, ILookupTask lookupTask)
 {
     _mappingService       = mappingService;
     _restaurantTask       = restaurantTask;
     _restaurantReviewTask = restaurantReviewTask;
     _restaurantRatingTask = restaurantRatingTask;
     _restaurantPhotoTask  = restaurantPhotoTask;
     _lookupTask           = lookupTask;
 }
Пример #5
0
 public HomeController(IMappingService mappingService, IRestaurantTask restaurantTask,
     IRestaurantReviewTask restaurantReviewTask, IRestaurantRatingTask restaurantRatingTask,
     IRestaurantPhotoTask restaurantPhotoTask, ILookupTask lookupTask)
 {
     _mappingService = mappingService;
     _restaurantTask = restaurantTask;
     _restaurantReviewTask = restaurantReviewTask;
     _restaurantRatingTask = restaurantRatingTask;
     _restaurantPhotoTask = restaurantPhotoTask;
     _lookupTask = lookupTask;
 }
        public void SetUp()
        {
            _restaurantBranchId = 1;
            _restaurantRatings  = new List <RestaurantRating>(3)
            {
                new RestaurantRating {
                    Id = 1, RestaurantBranchId = _restaurantBranchId, CreatedBy = "uvaraj", CreatedOn = DateTime.Now, Rating = 3
                },
                new RestaurantRating {
                    Id = 2, RestaurantBranchId = _restaurantBranchId, CreatedBy = "uvaraj", CreatedOn = DateTime.Now, Rating = 4
                },
                new RestaurantRating {
                    Id = 3, RestaurantBranchId = _restaurantBranchId, CreatedBy = "uvaraj", CreatedOn = DateTime.Now, Rating = 5
                }
            };

            _restaurantRatingRepository = new Mock <IRepository <RestaurantRating> >();
            _restaurantRatingRepository.Setup(q => q.Find(It.IsAny <Expression <Func <RestaurantRating, bool> > >()))
            .Returns(_restaurantRatings.AsQueryable());

            _restaurantRatingTask = new RestaurantRatingTask(_restaurantRatingRepository.Object);
        }
Пример #7
0
 public RestaurantRatingController(IRestaurantRatingTask restaurantRatingTask)
 {
     _restaurantRatingTask = restaurantRatingTask;
 }
 public RestaurantRatingController(IRestaurantRatingTask restaurantRatingTask)
 {
     _restaurantRatingTask = restaurantRatingTask;
 }