summaryrefslogtreecommitdiffstats
path: root/bank-eiffel/tests/test_account.e
diff options
context:
space:
mode:
Diffstat (limited to 'bank-eiffel/tests/test_account.e')
-rw-r--r--bank-eiffel/tests/test_account.e31
1 files changed, 16 insertions, 15 deletions
diff --git a/bank-eiffel/tests/test_account.e b/bank-eiffel/tests/test_account.e
index 6e65f52..e0dfe4d 100644
--- a/bank-eiffel/tests/test_account.e
+++ b/bank-eiffel/tests/test_account.e
@@ -20,30 +20,31 @@ feature -- Test routines
20 person1: PERSON 20 person1: PERSON
21 person2: PERSON 21 person2: PERSON
22 account: ACCOUNT 22 account: ACCOUNT
23 cre: ARRAY[REAL_64]
24 deb_rng: ARRAY[REAL_64]
25 dep_rng: ARRAY[REAL_64]
26 do 23 do
27 create person1.make ("SOME_SURNAME_1", "SOME_FIRSTNAME_1") 24 create person1.make ("SOME_SURNAME_1", "SOME_FIRSTNAME_1")
28 create person2.make ("SOME_SURNAME_2", "SOME_FIRSTNAME_2") 25 create person2.make ("SOME_SURNAME_2", "SOME_FIRSTNAME_2")
29 26
30 create cre.make_filled (0.0, 0, 1) 27 create account.make (person1, 0.01, 0.02, -50.0, <<0.01, 0.022>>, <<0.01, 0.02>>, <<-100, -50>>)
31 cre.put (-100.0, 0)
32 cre.put (-50.0, 1)
33 create deb_rng.make(0,1)
34 deb_rng.put (0.1, 0)
35 deb_rng.put (2.2, 1)
36 create dep_rng.make(0,1)
37 dep_rng.put (0.1, 0)
38 dep_rng.put (2.2, 1)
39
40 create account.make (person1, 1.0, 2.0, -50.0, deb_rng, dep_rng, cre)
41 account.add_authorized_signer (person2) 28 account.add_authorized_signer (person2)
42 29
43 30
44 --assert ("not_implemented", False) 31 --assert ("not_implemented", False)
45 end 32 end
46 33
47end 34 ADVANCE
35 local
36 person1: PERSON
37 account: ACCOUNT
38 b : REAL_64
39 do
40 create person1.make ("SOME_SURNAME_1", "SOME_FIRSTNAME_1")
41 create account.make (person1, 0.01, 0.02, -50.0, <<0.01, 0.022>>, <<0.01, 0.02>>, <<-100, -50>>)
42
43 account.deposit (100.0, person1)
44 account.advance
45
46 assert("balance not correct", account.get_balance = 101.0)
47 end
48 48
49end
49 50