//public List<string> GetAllIngredientNamesFromRatioDatabase(string filename) //{ // var vw = new VolumeToWeightLogic(); // var ListOfRatios = vw.ReadRatiosFromRatioDatabase(filename); // foreach (var ratio in ListOfRatios) // { // }UnalteredResponseDatabase // var CompiledListIngredients = new List<string>(); //} public decimal ReadOuncesForIngredient(string Ingredient, string filename) { var vw = new VolumeToWeightLogic(); var split = new SplitLines(); var currentIngredient = split.SplitLineAtColon(vw.ReadIngredientRatio(Ingredient, filename)); return(Convert.ToDecimal(currentIngredient[1])); }
public void ReadSpecificIngredient() { var vw = new VolumeToWeightLogic(); var filename = @"C:\Users\Rachel\Documents\Visual Studio 2015\Projects\RachelsRoses\Rachel-s-Roses\VolumeToWeightIngredientData.txt"; var expected = "salt: 10.72"; // new string[] { "salt", "10.72" }; var actual = vw.ReadIngredientRatio("salt", filename); Assert.AreEqual(expected, actual); }