Пример #1
0
        public void TestRegisterExpenseType()
        {
            IncomeTypeController incTC = new IncomeTypeController();
            incTC.RegisterIncomeType("AAA", "aaa");
            incTC.RegisterIncomeType("A1B1", "testes");

            List<IncomeType> list = PersistenceFactory.GetFactory().GetRepository().GetIncomeTypeRepository().All();

            Assert.AreEqual(list[0].ToString(), "AAA - aaa");
            Assert.AreEqual(list[1].ToString(), "A1B1 - testes");
        }
Пример #2
0
        /// <summary>
        /// The specific method to the register income type ui
        /// </summary>
        public void ShowRegisterIncomeType()
        {
            string key, description;

            Console.WriteLine("Insert the key for the income type");
            key = Console.ReadLine();
            Console.WriteLine("Insert the description fot the income type");
            description = Console.ReadLine();

            IncomeTypeController incTC = new IncomeTypeController();
            incTC.RegisterIncomeType(key, description);
        }