コード例 #1
0
        public void VerifyAddEditFormCreateCategory()
        {
            CategoryFacade facade = new CategoryFacade();
            Categories category = new Categories("Category", "20");

            facade.AddCategory(category);

            facade.AssertCategoryExist(category);
        }
コード例 #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);
                }
            }
        }
コード例 #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);
        }
コード例 #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);
                }
            }
        }