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); }
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) ; }
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)); }
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)); }
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); }
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) ; }
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); }