public void TestRegisterIncome() { IncomeController ic = new IncomeController(); IncomeType type = new IncomeType("AAA", "aaa"); DateTime date = new DateTime(2012, 12, 21, 15, 30, 00); ic.RegisterIncome(type, date, 25, "AAA"); List<Income> incs = ic.GetAllIncomes(); Assert.AreEqual("Income:\nDescription: AAA\nType: AAA - aaa\nAmount: 25\nDate: 21/12/2012 15:30:00", incs[0].ToString()); }
/// <summary> /// Method that will list all of incomes in repository /// </summary> private void List() { IncomeController ic = new IncomeController(); Console.WriteLine(" === Income List ==="); List<Income> incomes = ic.GetAllIncomes().ToList(); int i = 0; foreach (Income item in incomes) { Console.WriteLine(i); Console.WriteLine(item); Console.WriteLine("---\n"); i++; } }