From 9a787349e121be1ad9e83d4086244cd90422ee0e Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 23 May 2011 21:30:40 +0200 Subject: more tests --- bank-eiffel/tests/test_person.e | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'bank-eiffel/tests/test_person.e') diff --git a/bank-eiffel/tests/test_person.e b/bank-eiffel/tests/test_person.e index f42767c..01e9a50 100644 --- a/bank-eiffel/tests/test_person.e +++ b/bank-eiffel/tests/test_person.e @@ -26,18 +26,20 @@ feature -- Test routines assert("CREATE_EDIT_PERSON_RETIREE", attached {PERSON} student) end - CREATE_EDIT_PERSON_EMPTY_SURNAME + PERSON_EMPTY_SURNAME local person: PERSON retry_count: INTEGER do - if retry_count = 0 then + inspect retry_count + when 0 then create person.make("", "SOME_FIRSTNAME") - assert("CREATE_EDIT_PERSON_EMPTY_SURNAME_1", False) - elseif retry_count = 1 then + assert("PERSON_EMPTY_SURNAME_1", False) + when 1 then create person.make("SOME_SURNAME", "SOME_FIRSTNAME") person.surname := "" - assert("CREATE_EDIT_PERSON_EMPTY_SURNAME_3", False) + assert("PERSON_EMPTY_SURNAME_3", False) + else end rescue if not (create {EXCEPTIONS}).is_developer_exception then @@ -46,18 +48,20 @@ feature -- Test routines end end - CREATE_EDIT_PERSON_EMPTY_FIRSTNAME + PERSON_EMPTY_FIRSTNAME local person: PERSON retry_count: INTEGER do - if retry_count = 0 then + inspect retry_count + when 0 then create person.make("SOME_SURNAME", "") - assert("CREATE_EDIT_PERSON_EMPTY_FIRSTNAME_1", False) - elseif retry_count = 1 then + assert("PERSON_EMPTY_FIRSTNAME_1", False) + when 1 then create person.make("SOME_SURNAME", "SOME_FIRSTNAME") person.firstname := "" - assert("CREATE_EDIT_PERSON_EMPTY_FIRSTNAME_3", False) + assert("PERSON_EMPTY_FIRSTNAME_3", False) + else end rescue if not (create {EXCEPTIONS}).is_developer_exception then -- cgit v1.2.3