public void shouldCheckForInvalidRange()
 {
     ExpenseRepository repository = new ExpenseRepository();
     SummarizeExpenses request = new SummarizeExpenses { From = DateTime.Today.Date, To = DateTime.Today.Date.AddDays(-1) };
     
     var interaction = new SummarizeExpensesInteraction<RAMRepository.ExpenseRepository>(request, repository);
     interaction.performAction();
     var response = interaction.ResponseModel;
     Assert.IsTrue(response.Error.HasValue);
     Assert.AreEqual(Error.Codes.DATE_RANGE_INVALID, response.Error.Value.Code);
 }
        public void shouldGetAllExpensesSortedByCategory()
        {
            ExpenseRepository repository = new ExpenseRepository();
            SummarizeExpenses request = new SummarizeExpenses { From = DateTime.Today.Date, To = DateTime.Today.Date.AddDays(6) };
            
            var interaction = new SummarizeExpensesInteraction<RAMRepository.ExpenseRepository>(request, repository);
            interaction.performAction();
            var response = interaction.ResponseModel;
            Assert.IsFalse(response.Error.HasValue);

            Dictionary<string, double> summary = response.Expenses;

            Assert.AreEqual(summary.Count, 3);
            Assert.AreEqual(summary[gasCategory.Name], gas0.Amount + gas1.Amount);
            Assert.AreEqual(summary[foodCategory.Name], food0.Amount + food1.Amount);
            Assert.AreEqual(summary[gymCategory.Name], gym0.Amount + gym1.Amount);
        }