Пример #1
0
        public void EditCategory_InputStandardStringCategoryDoNotExists_NoChangesToCategoriesListReturnFalse()
        {
            BudgetModel model            = new BudgetModel();
            string      categoryTitle    = "food";
            string      newCategoryTitle = "clothes";

            bool result = model.EditCategory(categoryTitle, newCategoryTitle);

            Assert.IsFalse(result);
        }
Пример #2
0
        public void EditCategory_InputStandardStringCategoryExists_ChangeTitleOfCategoryReturnTrue()
        {
            BudgetModel model            = new BudgetModel();
            string      categoryTitle    = "food";
            string      newCategoryTitle = "clothes";

            model.AddCategory(categoryTitle);
            bool result = model.EditCategory(categoryTitle, newCategoryTitle);

            Assert.IsTrue(result);
        }
Пример #3
0
        public void EditCategory_InputOldCategoryIsNull_NoChangesToCategoriesListReturnFalse()
        {
            BudgetModel model            = new BudgetModel();
            string      categoryTitle    = null;
            string      newCategoryTitle = "food";

            model.AddCategory(categoryTitle);
            bool result = model.EditCategory(categoryTitle, newCategoryTitle);

            Assert.IsFalse(result);
        }