class TEST_PERSON inherit EQA_TEST_SET feature -- Test routines CREATE_EDIT_PERSON local person: PERSON student: STUDENT retiree: RETIREE do create person.make("SOME_SURNAME_1", "SOME_FIRSTNAME_1") assert("CREATE_EDIT_PERSON_FIRSTNAME_1", person.firstname.is_equal("SOME_FIRSTNAME_1")) assert("CREATE_EDIT_PERSON_SURNAME_1", person.surname.is_equal("SOME_SURNAME_1")) person.firstname := "SOME_FIRSTNAME_2" assert("CREATE_EDIT_PERSON_FIRSTNAME_2", person.firstname.is_equal("SOME_FIRSTNAME_2")) person.surname := "SOME_SURNAME_2" assert("CREATE_EDIT_PERSON_SURNAME_2", person.surname.is_equal("SOME_SURNAME_2")) create student.make ("STUDENT_SURNAME", "STUDENT_FIRSTNAME") assert("CREATE_EDIT_PERSON_STUDENT", attached {PERSON} student) create retiree.make ("RETIREE_SURNAME", "RETIREE_FIRSTNAME") assert("CREATE_EDIT_PERSON_RETIREE", attached {PERSON} student) end CREATE_EDIT_PERSON_EMPTY_SURNAME local person: PERSON retry_count: INTEGER do if retry_count = 0 then create person.make("", "SOME_FIRSTNAME") assert("CREATE_EDIT_PERSON_EMPTY_SURNAME_1", False) elseif retry_count = 1 then create person.make("SOME_SURNAME", "SOME_FIRSTNAME") person.surname := "" assert("CREATE_EDIT_PERSON_EMPTY_SURNAME_3", False) end rescue if not (create {EXCEPTIONS}).is_developer_exception then retry_count := retry_count + 1 retry end end CREATE_EDIT_PERSON_EMPTY_FIRSTNAME local person: PERSON retry_count: INTEGER do if retry_count = 0 then create person.make("SOME_SURNAME", "") assert("CREATE_EDIT_PERSON_EMPTY_FIRSTNAME_1", False) elseif retry_count = 1 then create person.make("SOME_SURNAME", "SOME_FIRSTNAME") person.firstname := "" assert("CREATE_EDIT_PERSON_EMPTY_FIRSTNAME_3", False) end rescue if not (create {EXCEPTIONS}).is_developer_exception then retry_count := retry_count + 1 retry end end end