public void Init() { this.carAdsRepoMock = new Mock <IEfRepostory <CarAd> >(); this.carBrandsRepoMock = new Mock <IEfRepostory <CarBrand> >().Object; this.carModelsRepoMock = new Mock <IEfRepostory <CarModel> >().Object; this.carFeatureServicesMock = new Mock <ICarFeatureServices>().Object; this.unitOfWorkMocked = new Mock <IEfUnitOfWork>().Object; this.carAds = new List <CarAd> { new CarAd { Title = "Awesome car!" }, new CarAd { Title = "Wohoo. Can be yours" }, new CarAd { Title = "Be fast!" }, }; this.expectedCarAd = new CarAd { Title = "Wohooo" }; carAds.Add(expectedCarAd); var carAdsQuarable = this.carAds.AsQueryable(); this.carAdsRepoMock.Setup(x => x.All).Returns(carAdsQuarable); }
public void Init() { this.carAdsRepoMock = new Mock <IEfRepostory <CarAd> >().Object; this.carBrandsRepoMock = new Mock <IEfRepostory <CarBrand> >().Object; this.carModelsRepoMock = new Mock <IEfRepostory <CarModel> >().Object; this.carFeatureServicesMock = new Mock <ICarFeatureServices>().Object; this.unitOfWorkMocked = new Mock <IEfUnitOfWork>().Object; }
public BookService(IEfRepostory <Book> bookRepository, IEfRepostory <Genre> genresRepository, IEfRepostory <Author> authorRepository) { Guard.WhenArgument(bookRepository, "Book Repository").IsNull().Throw(); Guard.WhenArgument(genresRepository, "Genre Repository").IsNull().Throw(); Guard.WhenArgument(authorRepository, "Author Repository").IsNull().Throw(); this.bookRepository = bookRepository; this.genresRepository = genresRepository; this.authorRepository = authorRepository; }
public UserServices(IEfRepostory <User> usersRepo, ICarAdServices carAdServices, IEfUnitOfWork unitOfWork) { Guard.WhenArgument(usersRepo, "usersRepo").IsNull().Throw(); Guard.WhenArgument(carAdServices, "carAdServices").IsNull().Throw(); Guard.WhenArgument(unitOfWork, "unitOfWork").IsNull().Throw(); this.usersRepo = usersRepo; this.carAdServices = carAdServices; this.unitOfWork = unitOfWork; }
public CarAdServices( IEfRepostory <CarAd> carAdsRepo, IEfRepostory <CarBrand> carBrandsRepo, IEfRepostory <CarModel> carModelsRepo, ICarFeatureServices carFeatureServices, IEfUnitOfWork unitOfWork) { Guard.WhenArgument(carAdsRepo, "carAdsRepo").IsNull().Throw(); Guard.WhenArgument(carBrandsRepo, "carBrandsRepo").IsNull().Throw(); Guard.WhenArgument(carModelsRepo, "carModelsRepo").IsNull().Throw(); Guard.WhenArgument(carFeatureServices, "carFeatureServices").IsNull().Throw(); Guard.WhenArgument(unitOfWork, "unitOfWork").IsNull().Throw(); this.carsAdsRepo = carAdsRepo; this.carBrandsRepo = carBrandsRepo; this.carModelsRepo = carModelsRepo; this.carFeatureServices = carFeatureServices; this.unitOfWork = unitOfWork; }
public void Init() { this.carAdsRepoMock = new Mock <IEfRepostory <CarAd> >(); this.carBrandsRepoMock = new Mock <IEfRepostory <CarBrand> >().Object; this.carModelsRepoMock = new Mock <IEfRepostory <CarModel> >().Object; this.carFeatureServicesMock = new Mock <ICarFeatureServices>(); this.unitOfWorkMocked = new Mock <IEfUnitOfWork>(); this.carAds = new List <CarAd> { new CarAd { Title = "Awesome car!" }, new CarAd { Title = "Wohoo. Can be yours" }, new CarAd { Title = "Be fast!" }, }.AsQueryable(); }
public RatingService(IEfRepostory <Rating> ratingRepository) { Guard.WhenArgument(ratingRepository, "Rating Repository").IsNull().Throw(); this.ratingRepository = ratingRepository; }
public CarModelServices(IEfRepostory <CarModel> carModelsRepo) { Guard.WhenArgument(carModelsRepo, "carModelsRepo").IsNull().Throw(); this.carModelsRepo = carModelsRepo; }
public void Init() { this.userRepoMock = new Mock <IEfRepostory <User> >().Object; this.carAdServicesMocked = new Mock <ICarAdServices>().Object; this.unitOfWorkMocked = new Mock <IEfUnitOfWork>().Object; }
public PostsService(IEfRepostory <Post> postsRepo, ISaveContext saveContext) { this.postsRepostory = postsRepo; this.saveContext = saveContext; }
public DailyWorkoutService(IEfRepostory <DailyWorkout> dailyWorkoutRepo, IUnitOfWork unitOfWork) { this.dailyWorkoutRepo = dailyWorkoutRepo ?? throw new ArgumentException("DailyWorkoutRepo Cannot be Null"); this.unitOfWork = unitOfWork ?? throw new ArgumentException("UnitOfWork Cannot be Null"); }
public CarFeaturesServices(IEfRepostory <CarFeature> carFeaturesRepo) { Guard.WhenArgument(carFeaturesRepo, "carFeaturesRepo").IsNull().Throw(); this.carFeaturesRepo = carFeaturesRepo; }
public TownServices(IEfRepostory <Town> townsRepo) { Guard.WhenArgument(townsRepo, "townsRepo").IsNull().Throw(); this.townsRepo = townsRepo; }
public void Init() { this.townRepoMocked = new Mock <IEfRepostory <Town> >().Object; }
public PendingWorkoutService(IEfRepostory <PendingWorkout> pendingWorkoutsRepo, IUnitOfWork unitOfWork) { this.pendingWorkoutsRepo = pendingWorkoutsRepo ?? throw new ArgumentException("PendingWorkout repo cannot be null"); this.unitOfWork = unitOfWork ?? throw new ArgumentException("Unit of work cannot be null"); }
public WorkoutService(IEfRepostory <Workout> workoutsRepo, IUnitOfWork unitOfWork) { this.workoutsRepo = workoutsRepo ?? throw new ArgumentException("Workouts repo cannot be null"); this.unitOfWork = unitOfWork ?? throw new ArgumentException("Unit fo work cannot be null"); }
public void Init() { this.carModelRepo = new Mock <IEfRepostory <CarModel> >().Object; }
public void Init() { this.carBranRepo = new Mock <IEfRepostory <CarBrand> >().Object; }
public void Init() { this.carFeatureRepo = new Mock <IEfRepostory <CarFeature> >().Object; }
public MemberService(IEfRepostory <Member> membersRepo, IUnitOfWork unitOfWork) { this.membersRepo = membersRepo ?? throw new ArgumentException("Members repo cannot be null"); this.unitOfWork = unitOfWork ?? throw new ArgumentException("Unit of work cannot be null"); }
public WeekScheduleService(IEfRepostory <WeekSchedule> weekScheduleRepo, IUnitOfWork unitOfWork, IDatetimeProvider datetimeProvider) { this.weekScheduleRepo = weekScheduleRepo ?? throw new ArgumentException("WeekSchedule repo cannot be null"); this.unitOfWork = unitOfWork ?? throw new ArgumentException("UnitOfWork cannot be null"); this.datetimeProvider = datetimeProvider ?? throw new ArgumentException("DateTime provider cannot be null"); }
public ExerciseService(IEfRepostory <Exercise> exercisesRepo, IUnitOfWork unitOfWork) { this.exercisesRepo = exercisesRepo ?? throw new ArgumentException("Exercise Repo cannot be null"); this.unitOfWork = unitOfWork ?? throw new ArgumentException("UnitOfWork cannot be null"); }
public WorkoutInformationService(IEfRepostory <WorkoutInformation> workoutInformationRepo, IUnitOfWork unitOfWork) { this.workoutInformationRepo = workoutInformationRepo ?? throw new ArgumentException("WorkoutInformation repo cannot be null"); this.unitOfWork = unitOfWork ?? throw new ArgumentException("Unit of work cannot be null"); }
public UserService(IEfRepostory <User> userRepository) { Guard.WhenArgument(userRepository, "User Repository").IsNull().Throw(); this.userRepository = userRepository; }