Example #1
0
        /// <summary>
        /// Informa qual foi o mês que cliente mais gastou;
        /// </summary>
        public static async Task PrintMostSpentMonth(this TransactionApplicationService clientService)
        {
            var month = await clientService.GetMostSpentMonth();

            Console.WriteLine(
                $"Mês que você mais gastou: {month.Key} (R$ {month.Value:N}).");
        }
Example #2
0
        public async Task ApplicationService_GetMostSpentMonth_IsValid()
        {
            var mostSpentMonth = await _applicationService.GetMostSpentMonth();

            var expectedMonth = new KeyValuePair <string, double>("junho", 25);

            Assert.AreEqual(mostSpentMonth, expectedMonth);
        }