예제 #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 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);
        }