示例#1
0
        public void Can_Create_Courses_When_No_Departments()
        {
            var DepartmentsTests = new DepartmentsTests();
            var CoursesTests     = new CoursesTests();

            DepartmentsTests.Can_Delete_Departments();
            CoursesTests.Can_Create_Courses();
        }
示例#2
0
        public void Can_Create_Course_With_Existing_Number()
        {
            var DepartmentsTests = new DepartmentsTests();
            var CoursesTests     = new CoursesTests();

            DepartmentsTests.Can_Create_Departments();

            CoursesTests.Can_Create_Courses();
            CoursesTests.Can_Create_Courses();
        }
示例#3
0
        public void Can_Create_Courses()
        {
            var DepartmentsTests = new DepartmentsTests();

            DepartmentsTests.Can_Create_Departments();

            var cred = 3;

            var CoursesToCreate = 5;

            for (int i = 0; i < CoursesToCreate; i++)
            {
                var n     = i;
                var title = "Course" + i;
                var dep   = "Dep" + i;
                NewCoursePage.CreateCourse(n, title, cred, dep);
                Assert.IsTrue(Page.DoesElementExistWithData(n.ToString() + ' ' + title + ' ' + cred + ' ' + dep));
            }
        }
示例#4
0
        public void Can_Edit_Course()
        {
            var DepartmentsTests = new DepartmentsTests();

            DepartmentsTests.Can_Create_Departments();

            var title = "EditedCourse";
            var cred  = 4;
            var dep   = "Dep4";

            NewCoursePage.GoTo();
            NewCoursePage.CreateCourse(111, "TestCourse", 3, "Dep0");
            EditCoursePage.GoTo();
            EditCoursePage.EditCourse(0)
            .WithTitle(title)
            .WithCredits(cred)
            .WithDepartment(dep)
            .Create();

            Assert.IsTrue(Page.DoesElementExistWithData(title + ' ' + cred + ' ' + dep));
        }