예제 #1
0
        public void EditStudent()
        {
            //Variables
            var lastName       = "Snow";
            var firstName      = "Jon";
            var enrollmentDate = "08/25/2014";
            var fullName       = string.Format("{0} {1}", lastName, firstName);

            //PreCondition
            PersonPreCondition.CreatePerson(firstName, lastName, enrollmentDate);

            //New Variables
            var newLastName       = "Plant";
            var newFirstName      = "Robert";
            var newEnrollmentDate = "09/16/2015";
            var newFullName       = string.Format("{0} {1}", newLastName, newFirstName);


            //Test Cases
            StartTest.HomePage
            .SelectStudentsOption()
            .VerifyPageIsValid(Students.Title)
            .ClickEditStudent(fullName)
            .ClearForm()
            .SetNewLastName(newLastName)
            .SetNewFirstName(newFirstName)
            .SetNewEnrollmenDate(newEnrollmentDate)
            .ClickSaveEditing()
            .VerifyStudentIsInTable(newFullName);
            ;

            PersonPostCondition.DeletePerson(newFirstName, newLastName);
        }
예제 #2
0
        public void EditInstructor()
        {
            /*Variables*/
            var lastName       = "Proton";
            var firstName      = "Professor";
            var hireDate       = "2014/08/28";
            var fullName       = string.Format("{0} {1}", lastName, firstName);
            var officeLocation = "far away";

            Console.WriteLine(fullName);

            //Pre condition
            PersonPreCondition.CreatePerson2(firstName, lastName, hireDate, null);

            /*TestCases*/
            StartTest.HomePage
            .SelectInstructorsOption()
            .VerifyPageIsValid(Instructors.Title)
            .ClickCreateInstructors()
            .SetLastNameValue(lastName)
            .SetFirstNameValue(firstName)
            .SetHireDateValue(hireDate)
            .SetOfficeLocationValue(officeLocation)
            .CreateInstructor()
            .VerifyInstructorWasCreated(fullName)
            ;
        }
예제 #3
0
        public void Test()
        {
            /*Variables*/
            var lastName       = StringGenerator.GenerateUniqueName();
            var firstName      = StringGenerator.GenerateUniqueName();
            var enrollmentDate = StringGenerator.GenerateRandomDate();
            var fullName       = string.Format("{0} {1}", lastName, firstName);

            /*PreConditions*/


            /*TestCases*/
            Assert.IsTrue(PersonPreCondition.CreatePerson(firstName, lastName, enrollmentDate));
        }
예제 #4
0
        public void TestCreateInstructorByDB()
        {
            /*Variables*/
            var lastName  = StringGenerator.GenerateUniqueName();
            var firstName = StringGenerator.GenerateUniqueName();
            var hireDate  = StringGenerator.GenerateRandomDate();
            var fullName  = string.Format("{0} {1}", lastName, firstName);

            /*PreConditions*/


            /*TestCases*/
            Assert.IsTrue(PersonPreCondition.CreatePerson2(firstName, lastName, hireDate, null));
        }
예제 #5
0
        public void FindStudentByNameTest()
        {
            //Variables
            var lastName       = StringGenerator.GenerateUniqueName();
            var firstName      = StringGenerator.GenerateUniqueName();
            var enrollmentDate = StringGenerator.GenerateRandomDate();

            //PreCondition
            PersonPreCondition.CreatePerson(firstName, lastName, enrollmentDate);

            //Test Cases
            StartTest.HomePage
            .SelectStudentsOption()
            .VerifyPageIsValid(Students.Title)
            .SetCriteriaToFind(firstName)
            .ClickFindStudent()
            .VerifyStudentIsInTable(firstName);

            PersonPostCondition.DeletePerson(firstName, lastName);
        }
예제 #6
0
        public void RemoveDeleteStudent()
        {
            //Variables
            var lastName       = "Snow";
            var firstName      = "Jon";
            var enrollmentDate = "08/25/2014";
            var fullName       = string.Format("{0} {1}", lastName, firstName);

            //PreCondition
            PersonPreCondition.CreatePerson(firstName, lastName, enrollmentDate);

            //Test Cases
            StartTest.HomePage
            .SelectStudentsOption()
            .VerifyPageIsValid(Students.Title)
            .DeleteStudent(fullName)
            .ClickDeleteStudent()
            .VerifyStudentIsNotPresentInTable(fullName)
            ;
        }
예제 #7
0
        public void DeleteStudentTestByUI()
        {
            /*Variables*/
            var lastName       = StringGenerator.GenerateUniqueName();
            var firstName      = StringGenerator.GenerateUniqueName();
            var enrollmentDate = StringGenerator.GenerateRandomDate();
            var fullName       = string.Format("{0} {1}", lastName, firstName);

            /*PreConditions*/
            PersonPreCondition.CreatePerson(firstName, lastName, enrollmentDate);

            /*TestCases*/
            StartTest.HomePage
            .SelectStudentsOption()
            .VerifyPageIsValid(Students.Title)
            .VerifyStudentWasCreated(fullName)
            .DeleteStudent(fullName)
            .ClickDeleteStudent()
            .VerifyStudentWasNotCreated(fullName);

            //post condition
            //PersonPostCondition.DeletePerson(firstName,lastName);
        }