Ejemplo n.º 1
0
        public void VerifyAddEditFormCreateCategory()
        {
            CategoryFacade facade = new CategoryFacade();
            Categories category = new Categories("Category", "20");

            facade.AddCategory(category);

            facade.AssertCategoryExist(category);
        }
Ejemplo n.º 2
0
        public void VerifyAddFormOrderErrorMessages()
        {
            CategoryFacade facade = new CategoryFacade();
            var path = PathGenerator.AbsoluteRelativeCombine(Paths.DataBindLocation + "CategoryFormOrder.xlsx");

            foreach (var sheet in Workbook.Worksheets(path))
            {
                foreach (var row in sheet.Rows)
                {
                    Categories category = new Categories(row.Cells);

                    facade.AddCategory(category);

                    facade.AssertOrderErrorMessage(category);
                }
            }
        }
Ejemplo n.º 3
0
        public void VerifyNestedCategoriesAreCreated()
        {
            CategoryFacade facade = new CategoryFacade();
            Categories category = new Categories("Category", "15");
            var listOfNestedCategories = new List<Categories>()
            {
                new Categories("NestedOne", "2"),
                new Categories("NestedTwo", "4"),
                new Categories("NestedThree", "3")
            };

            facade.AddCategory(category);
            facade.AddNestedCategory(category, listOfNestedCategories);
            facade.GoToHierarchyPage(category, listOfNestedCategories);

            facade.AssertCategoryHierachy(category, listOfNestedCategories);
        }
Ejemplo n.º 4
0
        public void VerifyEditFormNameErrorMessagesDataBind()
        {
            CategoryFacade facade = new CategoryFacade();
            Categories category = new Categories("Category", "20");
            var path = PathGenerator.AbsoluteRelativeCombine(Paths.DataBindLocation + "CategoryFormName.xlsx");

            facade.AddCategory(category);
            foreach (var sheet in Workbook.Worksheets(path))
            {
                foreach (var row in sheet.Rows)
                {
                    Categories editCategory = new Categories(row.Cells);

                    facade.EditCategory(category, editCategory);

                    facade.AssertNameErrorMessage(editCategory);
                }
            }
        }