CarbonFitnessTest.Integration.Results.ResultsShowXmlTest.shouldHaveCalorieHistory C# (CSharp) Метод

shouldHaveCalorieHistory() приватный Метод

private shouldHaveCalorieHistory ( ) : void
Результат void
        public void shouldHaveCalorieHistory()
        {
            Browser.GoTo(Url + "/?graphlines=" + NutrientEntity.EnergyInKcal);

            var userIngredients = new UserIngredientRepository().GetUserIngredientsByUser(UserId, Now, Now.AddDays(1));
            decimal sum = userIngredients.Sum(u => u.Ingredient.GetNutrient(NutrientEntity.EnergyInKcal).Value * (u.Measure / u.Ingredient.WeightInG));

            var chartSumOfCalorieValue = ">" + String.Format("{0:0.00000}", sum) + "</VALUE>";
            chartSumOfCalorieValue = chartSumOfCalorieValue.Replace(",", ".");

            Assert.That(Browser.Html, Contains.Substring(chartSumOfCalorieValue));
            Assert.That(Browser.Html, Contains.Substring(Now.ToShortDateString() + "</VALUE>"));
            Assert.That(Browser.Html, !Contains.Substring(","));
        }