Beispiel #1
0
        public void CalculateMostExpensiveGenderForDictionary()
        {
            var testDictionary            = testCollection.ToDictionary(k => k.OrderId, v => v);
            var actualMostExpensiveGender = sut.CalculateMostExpensiveGenderFromDictionary(testDictionary);

            //assert
            Assert.That(actualMostExpensiveGender.Equals("F"));
        }
Beispiel #2
0
        public string SimpleCalculateAllFromDictionary()
        {
            var maxPrice            = maxPriceCalculator.CalculateMaxPriceFromDictionary(this.OrderDictionary);
            var mostExpensiveGender = mostExpensiveGenderCalculator.CalculateMostExpensiveGenderFromDictionary(this.OrderDictionary);
            var orderTotal          = maxTotalCalculator.CalculateTotalFromDictionary(this.OrderDictionary);

            return($"Max Price: {maxPrice}\n" +
                   $"Most Expensive Gender: {mostExpensiveGender}\n" +
                   $"Total of all Orders: {orderTotal}\n");
        }