SlideShare a Scribd company logo
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Feature: Account Holder withdraws cash
As an Account Holder
I want to withdraw cash from an ATM
So that I can get money when the bank is closed
Scenario: Account has sufficient funds
Given the account balance is 100€
And the card is valid
And the machine contains enough money
When the Account Holder requests 20€
Then the ATM should dispense 20€
And the account balance should be 80€
And the card should be returned
Scenario: The ATM has insufficient funds
Given the account balance is 100€
And the card is valid
And the machine contains only 20€
When the Account Holder requests 30€
Then the ATM should say it has insufficient funds
And the account balance should be 100€
And the card should be returned
Bdd training-v1
Scenario: Account has insufficient funds
Given the account balance is 10€
And the card is valid
And the machine contains enough money
When the Account Holder requests 30€
Then the ATM should not dispense any money
And the ATM should say there are insufficient funds
And the account balance should still be 10€
And the card should be returned
Bdd training-v1
Bdd training-v1
Scenario: Wrong PIN
Given the card is valid
And its PIN number is "0000"
When the Account Holder enters "1234"
Then the ATM should say the PIN number is wrong
Scenario: Wrong PIN three times
Given the card is valid
And its PIN number is "0000"
When the Account Holder enters "1234"
And the Account Holder enters "4321"
And the Account Holder enters "2341"
Then the ATM should retain the card
And the ATM should say the card has been retained
Scenario: Card has been disabled
Given the card is disabled
When the Account Holder requests 30€
Then the ATM should retain the card
And the ATM should say the card has been retained
Scenario: Card has been disabled
Given the card is disabled
When the Account Holder requests 30€
Then the ATM should retain the card
And the ATM should say the card has been retained
Bdd training-v1
Feature: Interpolate
In order to interpolate values
As an Trader
I want to interpolate values in a range of Market data
Why this feature ?
Feature: Interpolate
In order to interpolate values
As an Trader
I want to interpolate values in a range of Market data
Why this feature ?
Feature: Linear Interpolation
In order to fill the gaps and provide a value for any
maturity
As a trader responsible for market-marking
I want to interpolate linearly values within a range of
points
And I want a flat extrapolation outside of the range of
points
Why this feature ?
Scenario: Change the negotiation price from positive to negative => soulte
cashflow appears and premium cashflow is modified
Given an FUNKY_EXOTIC
And deal way is sell
And deal nature is TOMATO
And trade value date is 2012/07/01
And nominal is 100 JPY
And negotiation price is 0.20 JPY
When I validate the deal
Then there are 1 Price cashflows
And there are 0 fee cashflows
When I change the negotiation price to -0.3 JPY
And I validate the deal
Then there are 1 Price cashflows
And there are 1 fee cashflows
And the trade cashflow's payment date is 2012/07/01
And the trade cashflow's way is receive
And the trade cashflow's amount is 30 JPY
And the fee cashflow's payment date is 2012/07/01
And the fee cashflow's way is give
And the fee cashflow's amount is 60 JPY
What about this scenario
Scenario: Change the negotiation price from positive to negative => soulte
cashflow appears and premium cashflow is modified
Given an FUNKY_EXOTIC
And deal way is sell
And deal nature is TOMATO
And trade value date is 2012/07/01
And nominal is 100 JPY
And negotiation price is 0.20 JPY
When I validate the deal
Then there are 1 Price cashflows
And there are 0 fee cashflows
When I change the negotiation price to -0.3 JPY
And I validate the deal
Then there are 1 Price cashflows
And there are 1 fee cashflows
And the trade cashflow's payment date is 2012/07/01
And the trade cashflow's way is receive
And the trade cashflow's amount is 30 JPY
And the fee cashflow's payment date is 2012/07/01
And the fee cashflow's way is give
And the fee cashflow's amount is 60 JPY
What about this scenario
d = new Deal();
d.SetWay(Sell);
d.SetNature(Tomato);
d.SetValueDate(new Date(...));
d.SetNominal(100, JPY);
d.SetNegotiationPrice(0.20, JPY);
cf = d.GetCashFlows();
AssertThat(IsEqual(...);
...
Scenario: Fee and Price cashflows when the negotiation price is set to a negative value
Given a sell for a nominal 100 JPY on FUNKY_EXOTIC TOMATO negotiation price 0.20
JPY traded on 2012/07/01
When the middle officer validates the deal
Then the trade has one Price cashflow and no Fee cashflow
When the middle officer changes the negotiation price to -0.3 JPY
And the middle officer validates the deal
Then the trade has the following cashflows:
| FlowType| Way | Amount | Currency | PaymentDate | Remarks |
| Price | Receive| 30 | JPY | 2012/07/01 | 100*abs(-0.3) |
| Fee | Give | 60 | JPY | 2012/07/01 | 100*2*abs(-0.3)|
What about this scenario
Communicate With the Business People !!!
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
You will learn to think
of automated tests
as executable
specification that
become living
documentation
– Mary Poppendieck
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1
Bdd training-v1

More Related Content

PPTX
Forexnx review
PPTX
PDF
Bdd training - v3
PDF
Bdd training v5.2.0 - public
PDF
CukeUp 2016 Agile Product Planning Workshop
PDF
All the world's a stage – the next step in automated testing practices
PDF
BDD in Action – principles, practices and real-world application
PPTX
BDD presentation
Forexnx review
Bdd training - v3
Bdd training v5.2.0 - public
CukeUp 2016 Agile Product Planning Workshop
All the world's a stage – the next step in automated testing practices
BDD in Action – principles, practices and real-world application
BDD presentation

More from Arnauld Loyer (9)

PDF
Brown Bag Lunch - BDD an introduction - 2017 feb/mar
PDF
Event storming Notes
PDF
BDD training v5.0.1
PDF
BDD - Writing better scenario
PDF
Nos premiers pas autour du Behavior Driven Development
PDF
Behavior Driven Development // Brown Bag Lunch v1.0.0
PDF
Dégraissons le mammouth ou Darwin a encore frappé - La théorie de l'évolution...
PDF
L'ABC du BDD (Behavior Driven Development)
PDF
Confiance&bdd softshake2013
Brown Bag Lunch - BDD an introduction - 2017 feb/mar
Event storming Notes
BDD training v5.0.1
BDD - Writing better scenario
Nos premiers pas autour du Behavior Driven Development
Behavior Driven Development // Brown Bag Lunch v1.0.0
Dégraissons le mammouth ou Darwin a encore frappé - La théorie de l'évolution...
L'ABC du BDD (Behavior Driven Development)
Confiance&bdd softshake2013
Ad

Recently uploaded (20)

PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Electronic commerce courselecture one. Pdf
PPT
Teaching material agriculture food technology
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Machine Learning_overview_presentation.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
Assigned Numbers - 2025 - Bluetooth® Document
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
MYSQL Presentation for SQL database connectivity
Dropbox Q2 2025 Financial Results & Investor Presentation
Electronic commerce courselecture one. Pdf
Teaching material agriculture food technology
Advanced methodologies resolving dimensionality complications for autism neur...
Group 1 Presentation -Planning and Decision Making .pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Spectroscopy.pptx food analysis technology
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
MIND Revenue Release Quarter 2 2025 Press Release
Machine Learning_overview_presentation.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Ad

Bdd training-v1

  • 38. Feature: Account Holder withdraws cash As an Account Holder I want to withdraw cash from an ATM So that I can get money when the bank is closed
  • 39. Scenario: Account has sufficient funds Given the account balance is 100€ And the card is valid And the machine contains enough money When the Account Holder requests 20€ Then the ATM should dispense 20€ And the account balance should be 80€ And the card should be returned
  • 40. Scenario: The ATM has insufficient funds Given the account balance is 100€ And the card is valid And the machine contains only 20€ When the Account Holder requests 30€ Then the ATM should say it has insufficient funds And the account balance should be 100€ And the card should be returned
  • 42. Scenario: Account has insufficient funds Given the account balance is 10€ And the card is valid And the machine contains enough money When the Account Holder requests 30€ Then the ATM should not dispense any money And the ATM should say there are insufficient funds And the account balance should still be 10€ And the card should be returned
  • 45. Scenario: Wrong PIN Given the card is valid And its PIN number is "0000" When the Account Holder enters "1234" Then the ATM should say the PIN number is wrong
  • 46. Scenario: Wrong PIN three times Given the card is valid And its PIN number is "0000" When the Account Holder enters "1234" And the Account Holder enters "4321" And the Account Holder enters "2341" Then the ATM should retain the card And the ATM should say the card has been retained
  • 47. Scenario: Card has been disabled Given the card is disabled When the Account Holder requests 30€ Then the ATM should retain the card And the ATM should say the card has been retained
  • 48. Scenario: Card has been disabled Given the card is disabled When the Account Holder requests 30€ Then the ATM should retain the card And the ATM should say the card has been retained
  • 50. Feature: Interpolate In order to interpolate values As an Trader I want to interpolate values in a range of Market data Why this feature ?
  • 51. Feature: Interpolate In order to interpolate values As an Trader I want to interpolate values in a range of Market data Why this feature ?
  • 52. Feature: Linear Interpolation In order to fill the gaps and provide a value for any maturity As a trader responsible for market-marking I want to interpolate linearly values within a range of points And I want a flat extrapolation outside of the range of points Why this feature ?
  • 53. Scenario: Change the negotiation price from positive to negative => soulte cashflow appears and premium cashflow is modified Given an FUNKY_EXOTIC And deal way is sell And deal nature is TOMATO And trade value date is 2012/07/01 And nominal is 100 JPY And negotiation price is 0.20 JPY When I validate the deal Then there are 1 Price cashflows And there are 0 fee cashflows When I change the negotiation price to -0.3 JPY And I validate the deal Then there are 1 Price cashflows And there are 1 fee cashflows And the trade cashflow's payment date is 2012/07/01 And the trade cashflow's way is receive And the trade cashflow's amount is 30 JPY And the fee cashflow's payment date is 2012/07/01 And the fee cashflow's way is give And the fee cashflow's amount is 60 JPY What about this scenario
  • 54. Scenario: Change the negotiation price from positive to negative => soulte cashflow appears and premium cashflow is modified Given an FUNKY_EXOTIC And deal way is sell And deal nature is TOMATO And trade value date is 2012/07/01 And nominal is 100 JPY And negotiation price is 0.20 JPY When I validate the deal Then there are 1 Price cashflows And there are 0 fee cashflows When I change the negotiation price to -0.3 JPY And I validate the deal Then there are 1 Price cashflows And there are 1 fee cashflows And the trade cashflow's payment date is 2012/07/01 And the trade cashflow's way is receive And the trade cashflow's amount is 30 JPY And the fee cashflow's payment date is 2012/07/01 And the fee cashflow's way is give And the fee cashflow's amount is 60 JPY What about this scenario d = new Deal(); d.SetWay(Sell); d.SetNature(Tomato); d.SetValueDate(new Date(...)); d.SetNominal(100, JPY); d.SetNegotiationPrice(0.20, JPY); cf = d.GetCashFlows(); AssertThat(IsEqual(...); ...
  • 55. Scenario: Fee and Price cashflows when the negotiation price is set to a negative value Given a sell for a nominal 100 JPY on FUNKY_EXOTIC TOMATO negotiation price 0.20 JPY traded on 2012/07/01 When the middle officer validates the deal Then the trade has one Price cashflow and no Fee cashflow When the middle officer changes the negotiation price to -0.3 JPY And the middle officer validates the deal Then the trade has the following cashflows: | FlowType| Way | Amount | Currency | PaymentDate | Remarks | | Price | Receive| 30 | JPY | 2012/07/01 | 100*abs(-0.3) | | Fee | Give | 60 | JPY | 2012/07/01 | 100*2*abs(-0.3)| What about this scenario Communicate With the Business People !!!
  • 82. You will learn to think of automated tests as executable specification that become living documentation – Mary Poppendieck