public void shouldCheckForInvalidRange()
 {
     ExpenseRepository repository = new ExpenseRepository();
     ListExpenses request = new ListExpenses { From = DateTime.Today.Date, To = DateTime.Today.Date.AddDays(-1) };
     
     var interaction = new ListExpensesInteraction<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 shouldGetAllExpenses()
        {
            ExpenseRepository repository = new ExpenseRepository();
            ListExpenses request = new ListExpenses { From = DateTime.Today.Date, To = DateTime.Today.Date.AddDays(6) };
            
            var interaction = new ListExpensesInteraction<RAMRepository.ExpenseRepository>(request, repository);
            interaction.performAction();
            var response = interaction.ResponseModel;
            Assert.IsFalse(response.Error.HasValue);

            var expenses = response.Expenses.Select(x => new Expense() { Amount = x.Amount, Date = x.Date, Category = new Category() { Name = x.Category}, ExpenseId = x.ExpenseId }).ToList();

            Assert.AreEqual(expenses.Count, 6);
            Assert.IsTrue(expenses.Contains(gas0));
            Assert.IsTrue(expenses.Contains(gas1));
            Assert.IsTrue(expenses.Contains(food0));
            Assert.IsTrue(expenses.Contains(food1));
            Assert.IsTrue(expenses.Contains(gym0));
            Assert.IsTrue(expenses.Contains(gym1));
        }