note description: "[ Eiffel tests that can be executed by testing tool. ]" author: "EiffelStudio test wizard" date: "$Date$" revision: "$Revision$" testing: "type/manual" class TEST_ACCOUNT inherit EQA_TEST_SET feature -- Test routines CREATE_EDIT_ACCOUNT local person1: PERSON person2: PERSON person3: PERSON account1: ACCOUNT account2: ACCOUNT do create person1.make ("SOME_SURNAME_1", "SOME_FIRSTNAME_1") create person2.make ("SOME_SURNAME_2", "SOME_FIRSTNAME_2") create person3.make ("SOME_SURNAME_3", "SOME_FIRSTNAME_3") create account1.make (person1, 0.01, 0.02, -50.0, [0.01, 0.022], [0.01, 0.02], [-100.0, -50.0]) assert("CREATE_EDIT_ACCOUNT_SIGNER_1", account1.get_authorized_signers.count = 1) account1.add_authorized_signer (person2) account1.add_authorized_signer (person2) account1.add_authorized_signer (person3) account1.remove_authorized_signer (person3) assert("CREATE_EDIT_ACCOUNT_SIGNER_2", account1.get_authorized_signers.count = 2) assert("CREATE_EDIT_ACCOUNT_BALANCE_1", account1.balance = 0.0) account1.deposit (50.0, person1) account1.deposit (50.0, person2) -- balance = 100.0 account1.advance -- balance = 100.0 + 1% deposit account1.withdraw (100.0 + 100.0 * 0.01 + 50.0, person1) -- balance = -50.0 account1.creditline := -100.0 account1.withdraw (50.0, person1) -- balance = -100.0 account1.advance -- balance = -100.0 + 2% debit assert("CREATE_EDIT_ACCOUNT_BALANCE_2", account1.balance = -102.0) create account2.make(person3, 0.01, 0.02, -50, [0.01, 0.022], [0.01, 0.02], [-100.0, -50.0]) account2.deposit (102.0, person3) account2.transfer (102.0, person3, account1, person1) assert("CREATE_EDIT_ACCOUNT_BALANCE_3", account1.balance = 0.0 and account2.balance = 0.0) account1.interest_deposit := 0.01 account1.interest_deposit := 0.022 account1.interest_debit := 0.01 account1.interest_debit := 0.02 account1.creditline := -100.0 account1.creditline := -50.0 account1.transfer_minamount := 10.0 end CREATE_STUDENTACCOUNT local person: STUDENT account: STUDENTACCOUNT do create person.make("SOME_SURNAME", "SOME_FIRSTNAME") create account.make(person, 0.01, 0.02, -50.0, [0.01, 0.022], [0.01, 0.02], [-100.0, -50.0]) end CREATE_RETIREEACCOUNT local person: RETIREE account: RETIREEACCOUNT do create person.make("SOME_SURNAME", "SOME_FIRSTNAME") create account.make(person, 0.01, 0.02, -50.0, [0.01, 0.022], [0.01, 0.02], [-100.0, -50.0]) end end