|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Be.Corebvba.Aubergine;
namespace Com.CodeProject.BDDExample
{
class Account_Holder_withdraws_cash : Story<AccountContext>
{
As_an Account_Holder;
I_want to_withdraw_cash_from_an_ATM;
So_that I_can_get_money_when_the_bank_is_closed;
class Account_has_sufficient_funds : Scenario
{
Given the_account_balance_is_100;
Given the_card_is_valid;
Given the_machine_contains_enough_money;
When the_Account_Holder_requests_20;
Then the_ATM_should_dispense_20;
Then the_account_balance_should_be_80;
Then the_card_should_be_returned;
}
class Account_has_insufficient_funds : Scenario
{
Given the_account_balance_is_10;
Given the_card_is_valid;
Given the_machine_contains_enough_money;
When the_Account_Holder_requests_20;
Then the_ATM_should_not_dispense_any_money;
Then the_ATM_should_say_there_are_insufficient_funds;
Then the_account_balance_should_be_10;
Then the_card_should_be_returned;
}
class Card_has_been_disabled : Scenario
{
Given the_card_is_disabled;
When the_Account_Holder_requests_20;
Then the_ATM_should_retain_the_card;
Then the_ATM_should_say_the_card_has_been_retained;
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.