Ejemplo n.º 1
0
        private void InitMachine(int feePercent)
        {
            _feesPercentToAdd = new FeePercentage(feePercent);

            ProductManager = new ProductManager();
            RecipeManager  = new RecipeManager(ProductManager.GetProductList(), _feesPercentToAdd);
        }
Ejemplo n.º 2
0
        public Recipe(string recipeName, FeePercentage feesPercentToAdd)
        {
            if (string.IsNullOrWhiteSpace(recipeName))
            {
                throw new Exception($"Recipe: recipeName cannot be null");
            }

            _recipeIngredients = new List <Ingredient>();

            RecipeName = recipeName;
            RecipeId   = "recipe-" + Guid.NewGuid().ToString();

            _feesPercentToAdd = feesPercentToAdd;
        }
Ejemplo n.º 3
0
        public RecipeManager(Dictionary <string, Product> productList, FeePercentage Fee)
        {
            _percentFeesToAdd = Fee;

            _products = productList;
        }