Ejemplo n.º 1
0
        protected void addCategoryButton_OnClick(object sender, EventArgs e)
        {
            Category aCategory = new Category();

            aCategory.CategoryName = categoryNameTextBox.Text;
            messageLabel.ForeColor = Color.Green;
            messageLabel.Text      = aBusinessLogic.AddCategory(aCategory);
            ClearSection();
        }
        public void AddCategoryTest()
        {
            Category aCategory = new Category
            {
                CategoryName = "Shoe"
            };
            string actual  = "Save SuccessFully";
            string predict = aProductBusinessLogic.AddCategory(aCategory);

            Assert.AreEqual(actual, predict);
        }