summaryrefslogtreecommitdiffstats
path: root/bank-eiffel/tests/test_person.e
blob: f23df0368ab921b46836f7647755f8843569bdbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
note
	description: "[
		Eiffel tests that can be executed by testing tool.
	]"
	author: "EiffelStudio test wizard"
	date: "$Date$"
	revision: "$Revision$"
	testing: "type/manual"

class
	TEST_PERSON

inherit
	EQA_TEST_SET

feature -- Test routines

	CREATE_PERSON
		local
			person: PERSON
		do
			create person.make("SOME_SURNAME", "SOME_FIRSTNAME")
		end

	CREATE_PERSON_NO_SURNAME
		local
			person: PERSON
			retried: BOOLEAN
		do
			if not retried then
				create person.make("", "SOME_FIRSTNAME")
				retried := True
				assert("CREATE_PERSON_NO_SURNAME", False)
			end
		rescue
			if not retried then
				retried := True
				retry
			end
		end

	CREATE_PERSON_NO_FIRSTNAME
		local
			person: PERSON
			retried: BOOLEAN
		do
			if not retried then
				create person.make("SOME_SURNAME", "")
				retried := True
				assert("CREATE_PERSON_NO_FIRSTNAME", False)
			end
		rescue
			if not retried then
				retried := True
				retry
			end
		end
end