public ActionResult Ingredient(string name, string measurement)
        {
            var rest = new MakeRESTCalls();

            if (string.IsNullOrEmpty(name))
            {
                return(Redirect("/home/RecipeBox"));
            }
            if (string.IsNullOrEmpty(name) && string.IsNullOrEmpty(measurement))
            {
                return(Redirect("/home/recipe?name=" + currentRecipe.name));
            }
            foreach (var ingredient in currentRecipe.ingredients)
            {
                if (ingredient.name == name && ingredient.measurement == measurement)
                {
                    currentIngredient = ingredient;
                }
            }
            ViewBag.currentrecipe                   = currentRecipe;
            ViewBag.currentingredient               = currentIngredient;
            ViewBag.currentitemresponselist         = rest.GetListItemResponses(currentIngredient);
            ViewBag.currentitemresponselistnoweight = rest.GetListItemResponseNoSellingWeights(currentIngredient);
            return(View());
        }
        public void TestListOfItemResponsesNoWeightVanillaExtractFirstLetterCapitalized()
        {
            var rest     = new MakeRESTCalls();
            var i        = new Ingredient("Vanilla Extract");
            var expected = new List <Ingredient>();
            var actual   = rest.GetListItemResponseNoSellingWeights(i);

            Assert.AreEqual(expected, actual);
        }
        public void TestListOfItemResponsesNoWeight()
        {
            var rest     = new MakeRESTCalls();
            var i        = new Ingredient("Bread Flour");
            var expected = new List <Ingredient>();
            var actual   = rest.GetListItemResponseNoSellingWeights(i);

            Assert.AreEqual(expected, actual); //this is just to make sure actual is giving me what i want... it is
        }
        public void TestListOfItemResponsesNoWeightVanillaExtract()
        {
            var rest     = new MakeRESTCalls();
            var i        = new Ingredient("vanilla extract");
            var expected = new List <Ingredient>();
            var actual   = rest.GetListItemResponseNoSellingWeights(i);

            Assert.AreEqual(expected, actual);
            //ok, this one is passing, but i don't want it to, i have to test capitalization
        }