public RecipeController( IRecipeRepository recipeRepo, IRecipeIngredientRepository ingredientRepo, IStepRepository stepRepo, IRecipeImageRepository imageRepo, IRecipeRateRepository rateRepo, ICategoryRepository categoriesRepo, IBookmarkRepository bookMarkRepo, IRecipeCategoryRepository categoryRepo, IUserRepository userRepo, IHostingEnvironment environment, IHttpContextAccessor accessor ) { this.recipeRepo = recipeRepo; this.ingredientRepo = ingredientRepo; this.stepRepo = stepRepo; this.imageRepo = imageRepo; this.rateRepo = rateRepo; this.categoriesRepo = categoriesRepo; this.bookMarkRepo = bookMarkRepo; this.categoryRepo = categoryRepo; this.userRepo = userRepo; this.environment = environment; this.accessor = accessor; }
public void Get_ReturnsEmptyList() { this.recipeIngredientRepository = new RecipeIngredientRepository(new FileClientMockFails()); var actual = this.recipeIngredientRepository.Get(0); Assert.IsNotNull(actual); Assert.IsFalse(actual.Any()); }
public RecipesController(IRecipeRepository recipeRepo, IRecipeIngredientRepository recipeIngredientRepo, IInstructionRepository instructionRepo, IIngredientRepository ingredientRepo, IEquipmentRepository equipmentRepo, IRecipeEquipmentRepository recipeEquipmentRepo, IUserRepository userRepo) { RecipeRepo = recipeRepo; RecipeIngredientRepo = recipeIngredientRepo; InstructionRepo = instructionRepo; IngredientRepo = ingredientRepo; EquipmentRepo = equipmentRepo; RecipeEquipmentRepo = recipeEquipmentRepo; UserRepo = userRepo; }
public void Initialize() { this.ingredientRepository = new IngredientRepositoryMock(); this.recipeRepository = new RecipeRepositoryMock(); this.recipeIngredientRepository = new RecipeIngredientRepositoryMock(); this.recipeManager = new RecipeManager( this.ingredientRepository, this.recipeRepository, this.recipeIngredientRepository ); }
public RecipeService(IRecipeRepository recipeRepository, IRecipeIngredientRepository recipeIngredientRepository, IStepRepository stepRepository, IRecipeHistoryRepository recipeHistoryRepository, ISecurityService securityService) { RecipeRepository = recipeRepository; RecipeIngredientRepository = recipeIngredientRepository; StepRepository = stepRepository; RecipeHistoryRepository = recipeHistoryRepository; RecipeParser = new RecipeParser(new ParserConfiguration()); SecurityService = securityService; }
public RecipeController(IRecipeRepository recipeRepository, ICategoryRepository categoryRepository, IRecipeCategoryRepository recipeCategoryRepository, IRecipeDirectionRepository recipeDirectionRepository, IRecipeIngredientRepository recipeIngredientRepository, IRecipeIngredientAmountRepository recipeIngredientAmountRepository) { _recipeRepository = recipeRepository; _categoryRepository = categoryRepository; _recipeCategoryRepository = recipeCategoryRepository; _recipeDirectionRepository = recipeDirectionRepository; _recipeIngredientRepository = recipeIngredientRepository; _recipeIngredientAmountRepository = recipeIngredientAmountRepository; }
public RecipeController(IRecipeRepository recipeRepository, ICategoryRepository categoryRepository, IIngredientDetailRepository ingredientDetailRepository, IRecipeIngredientRepository recipeIngredientRepository, IReviewCommentDetailRepository reviewCommentDetailRepository, IRecipeReviewCommentRepository recipeReviewCommentRepository ) { Recipes = recipeRepository.Recipes; IngredientDetails = ingredientDetailRepository.IngredientDetails; RecipeIngredients = recipeIngredientRepository.RecipeIngredients; ReviewCommentDetails = reviewCommentDetailRepository.ReviewCommentDetails; RecipeReviewComments = recipeReviewCommentRepository.RecipeReviewComments; Categories = categoryRepository.Categories; iRecipeReviewCommentRepository = recipeReviewCommentRepository; iReviewCommentDetailRepository = reviewCommentDetailRepository; }
public RecipeManager( IIngredientRepository ingredientRepository, IRecipeRepository recipeRepository, IRecipeIngredientRepository recipeIngredientRepository) { if (ingredientRepository == null) throw new ArgumentNullException("ingredientRepository"); //nameof(ingredientRepository) if (recipeRepository == null) throw new ArgumentNullException("recipeRepository"); //nameof(recipeRepository) if (recipeIngredientRepository == null) throw new ArgumentNullException("recipeIngredientRepository"); //nameof(recipeIngredientRepository) this.ingredientRepository = ingredientRepository; this.recipeRepository = recipeRepository; this.recipeIngredientRepository = recipeIngredientRepository; }
public DataController(IHostingEnvironment ihostingEnvironment, ICategoryRepository categoryRepository, IRecipeRepository recipeRepository, IIngredientDetailRepository ingredientDetailRepository, IRecipeModalRepository recipeModalRepository, IModalDetailRepository modalDetailRepository, IRecipeIngredientRepository recipeIngredientRepository, IRecipeReviewCommentRepository recipeReviewCommentRepository, IReviewCommentDetailRepository reviewCommentDetailRepository ) { this.ihostingEnvironment = ihostingEnvironment; this.iCategoryRepo = categoryRepository; this.iRecipeRepo = recipeRepository; this.iIngredientDetailRepo = ingredientDetailRepository; this.iModalDetailRepo = modalDetailRepository; this.iRecipeModalRepo = recipeModalRepository; this.iRecipeIngredientRepo = recipeIngredientRepository; this.iRecipeReviewCommentRepo = recipeReviewCommentRepository; this.iReviewCommentDetailRepo = reviewCommentDetailRepository; }
public UnitOfWork(RecipeBookContext context, ICategoryRepository categoryRepository, IIngredientRepository ingredientRepository, IRecipeRepository recipeRepository, IRecipeIngredientRepository recipeIngredientRepository, IRecipeStepRepository recipeStepRepository) { _context = context ?? throw new ArgumentNullException(nameof(context)); Categories = categoryRepository ?? throw new ArgumentNullException(nameof(categoryRepository)); Recipes = recipeRepository ?? throw new ArgumentNullException(nameof(recipeRepository)); Ingredients = ingredientRepository ?? throw new ArgumentNullException(nameof(ingredientRepository)); RecipeIngredients = recipeIngredientRepository ?? throw new ArgumentNullException(nameof(recipeIngredientRepository)); RecipeSteps = recipeStepRepository ?? throw new ArgumentNullException(nameof(recipeStepRepository)); }
public RecipeIngredientCommandHandler(IRecipeIngredientRepository recipeIngredientRepository) { _recipeIngredientRepository = recipeIngredientRepository; }
public void Initialize() { this.client = new FileClientMock(); this.recipeIngredientRepository = new RecipeIngredientRepository(this.client); }
public RecipeController(IRecipeRepository recipeRepository, IRecipeIngredientRepository recipeIngredientRepository) { _recipeRepository = recipeRepository; _recipeIngredientRepository = recipeIngredientRepository; }
public AmountTypeCommandHandler(IAmountTypeRepository amountTypeRepository, IRecipeIngredientRepository recipeIngredientRepository, IShoplistIngredientRepository shoplistIngredientRepository) { _amountTypeRepository = amountTypeRepository; _recipeIngredientRepository = recipeIngredientRepository; _shoplistIngredientRepository = shoplistIngredientRepository; }
public RecipeIngredientService(IUnitOfWork unitOfWork, IRecipeIngredientRepository recipeIngredientRepository) : base(unitOfWork, recipeIngredientRepository) { _unitOfWork = unitOfWork; _recipeIngredientRepository = recipeIngredientRepository; }
public IngredientCommandHandler(IIngredientRepository ingredientRepository, IRecipeIngredientRepository recipeIngredientRepository, IShoplistIngredientRepository shoplistIngredientRepository) { _ingredientRepository = ingredientRepository; _recipeIngredientRepository = recipeIngredientRepository; _shoplistIngredientRepository = shoplistIngredientRepository; }
public RecipeIngredientService(IRecipeIngredientRepository recipeIngredientRepository, IUnitOfWork unitOfWork) { _recipeIngredientRepository = recipeIngredientRepository; _unitOfWork = unitOfWork; }
public IngredientsController(IRecipeIngredientRepository recipeIngredientRepository) { RecipeIngredientRepository = recipeIngredientRepository; }
public RecipeIngredientApplicationService(IUnitOfWork uow, IRecipeIngredientRepository repository, RecipeIngredientCommandHandler handler) : base(uow) { this._handler = handler; this._repository = repository; }