test_savings_account - indexing description"Tests for...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
indexing description: "Tests for SAVINGS_ACCOUNT" author: "Gunnar Gotshalks" date: "$2004 January 30$" revision: "$1.0.0$" class TEST_SAVINGS_ACCOUNT inherit ES_TEST create make c --======================== feature {NONE} -- Initialization make is -- Run tests do all_violation_cases all_boolean_cases show_browser run_espec end --======================== feature -- Violation f all_violation_cases is -- Gather all violation cases together to simplify turning off while -- working on the boolean cases do add_violation_case (agent create_negative_amount) add_violation_case_with_tag ("positive_deposit", agent create_negative_amount) add_violation_case (agent deposit_zero_amount) add_violation_case (agent withdraw_zero_amount) add_violation_case (agent withdraw_gt_balance) end create_negative_amount is local the_account : SAVINGS_ACCOUNT initial_deposit : REAL do comment("Precondition create -1, negative at boundary") initial_deposit := -1 create the_account.open(initial_deposit) end deposit_zero_amount is local the_account : SAVINGS_ACCOUNT initial_deposit : REAL the_amount : REAL do comment("Precondition deposit 0, at boundary") initial_deposit := 500 ; the_amount := 0 create the_account.open(initial_deposit) the_account.deposit(the_amount) end withdraw_zero_amount is
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/03/2010 for the course COMPUTER S CSE 3221 taught by Professor Hui during the Spring '10 term at York University.

Page1 / 4

test_savings_account - indexing description"Tests for...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online