summaryrefslogtreecommitdiffstats
path: root/bank-eiffel/tests/test_person.e
diff options
context:
space:
mode:
Diffstat (limited to 'bank-eiffel/tests/test_person.e')
-rw-r--r--bank-eiffel/tests/test_person.e24
1 files changed, 14 insertions, 10 deletions
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
26 assert("CREATE_EDIT_PERSON_RETIREE", attached {PERSON} student) 26 assert("CREATE_EDIT_PERSON_RETIREE", attached {PERSON} student)
27 end 27 end
28 28
29 CREATE_EDIT_PERSON_EMPTY_SURNAME 29 PERSON_EMPTY_SURNAME
30 local 30 local
31 person: PERSON 31 person: PERSON
32 retry_count: INTEGER 32 retry_count: INTEGER
33 do 33 do
34 if retry_count = 0 then 34 inspect retry_count
35 when 0 then
35 create person.make("", "SOME_FIRSTNAME") 36 create person.make("", "SOME_FIRSTNAME")
36 assert("CREATE_EDIT_PERSON_EMPTY_SURNAME_1", False) 37 assert("PERSON_EMPTY_SURNAME_1", False)
37 elseif retry_count = 1 then 38 when 1 then
38 create person.make("SOME_SURNAME", "SOME_FIRSTNAME") 39 create person.make("SOME_SURNAME", "SOME_FIRSTNAME")
39 person.surname := "" 40 person.surname := ""
40 assert("CREATE_EDIT_PERSON_EMPTY_SURNAME_3", False) 41 assert("PERSON_EMPTY_SURNAME_3", False)
42 else
41 end 43 end
42 rescue 44 rescue
43 if not (create {EXCEPTIONS}).is_developer_exception then 45 if not (create {EXCEPTIONS}).is_developer_exception then
@@ -46,18 +48,20 @@ feature -- Test routines
46 end 48 end
47 end 49 end
48 50
49 CREATE_EDIT_PERSON_EMPTY_FIRSTNAME 51 PERSON_EMPTY_FIRSTNAME
50 local 52 local
51 person: PERSON 53 person: PERSON
52 retry_count: INTEGER 54 retry_count: INTEGER
53 do 55 do
54 if retry_count = 0 then 56 inspect retry_count
57 when 0 then
55 create person.make("SOME_SURNAME", "") 58 create person.make("SOME_SURNAME", "")
56 assert("CREATE_EDIT_PERSON_EMPTY_FIRSTNAME_1", False) 59 assert("PERSON_EMPTY_FIRSTNAME_1", False)
57 elseif retry_count = 1 then 60 when 1 then
58 create person.make("SOME_SURNAME", "SOME_FIRSTNAME") 61 create person.make("SOME_SURNAME", "SOME_FIRSTNAME")
59 person.firstname := "" 62 person.firstname := ""
60 assert("CREATE_EDIT_PERSON_EMPTY_FIRSTNAME_3", False) 63 assert("PERSON_EMPTY_FIRSTNAME_3", False)
64 else
61 end 65 end
62 rescue 66 rescue
63 if not (create {EXCEPTIONS}).is_developer_exception then 67 if not (create {EXCEPTIONS}).is_developer_exception then