From 3d0cdbe62989a59975938d4a0ab734d3e7f41be8 Mon Sep 17 00:00:00 2001 From: totycro Date: Mon, 23 May 2011 01:21:19 +0200 Subject: added advance --- bank-eiffel/tests/test_account.e | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'bank-eiffel/tests') 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 person1: PERSON person2: PERSON account: ACCOUNT - cre: ARRAY[REAL_64] - deb_rng: ARRAY[REAL_64] - dep_rng: ARRAY[REAL_64] do create person1.make ("SOME_SURNAME_1", "SOME_FIRSTNAME_1") create person2.make ("SOME_SURNAME_2", "SOME_FIRSTNAME_2") - create cre.make_filled (0.0, 0, 1) - cre.put (-100.0, 0) - cre.put (-50.0, 1) - create deb_rng.make(0,1) - deb_rng.put (0.1, 0) - deb_rng.put (2.2, 1) - create dep_rng.make(0,1) - dep_rng.put (0.1, 0) - dep_rng.put (2.2, 1) - - create account.make (person1, 1.0, 2.0, -50.0, deb_rng, dep_rng, cre) + create account.make (person1, 0.01, 0.02, -50.0, <<0.01, 0.022>>, <<0.01, 0.02>>, <<-100, -50>>) account.add_authorized_signer (person2) --assert ("not_implemented", False) end -end + ADVANCE + local + person1: PERSON + account: ACCOUNT + b : REAL_64 + do + create person1.make ("SOME_SURNAME_1", "SOME_FIRSTNAME_1") + create account.make (person1, 0.01, 0.02, -50.0, <<0.01, 0.022>>, <<0.01, 0.02>>, <<-100, -50>>) + + account.deposit (100.0, person1) + account.advance + + assert("balance not correct", account.get_balance = 101.0) + end +end -- cgit v1.2.3