Coder Social home page Coder Social logo

bank-app-kata's Introduction

Kata BDD: Bank Application

The goal of this kata is to write new executable specifications for our bank application and implement them using TDD. In this way, you will be doing Outside-In development with Double Loop TDD.

What to do

Step 1: Add the withdrawal feature

1.Create the file src/specs/features/withdraw_from_account.feature with the following content:

 Feature: Withdraw from account
   As a client of the bank
   I want to withdraw money from my account
   In order to have cash
 
   Scenario: An existing client withdraws from his account
       Given an existing client named "pierre-jean" with 100.0 EUR in his account
       When he withdraws 10.0 EUR from his account
       Then the new balance is 90.0 EUR

2.Implement the missing steps described in the previous scenario in the class net.diegolemos.bankapp.steps.account.AccountStepdefs.

3.By doing TDD, implement the 'withdraw' feature just added before, starting from front (html) and going deeper as you code. By the end, users could be able to withdraw from user interface. Decide when to use any of all existing test types (e2e, integration and unit tests).

Step 2: Cover boarder cases for last feature

Add a scenario in the previous added feature for the case when a withdrawal generates an overdraft (clients that have balance 0.0 and withdrawals must have balance 0.0 after the operation).

Step 3: Update the existing feature deposit

Currently, users can add a negative deposit, which does not make sens. Add a new scenario to fix this issue. Does this need to be fixed in the front end, in the bacn end or both?

Step 4: Update withdrawal feature

Check if it is possible to withdraw a negative value. If it is the case, fix it. Add the corresponding BDD scenario.

Step 5: Implement the transfer feature

From now on, users will be able to transfer money from one to another. Implement this feature. Write the BDD feature for it. Write BDD scenarios for the main case, but write also scenarios for boarder cases, like: can one transfer money one don't have?

Compile & Install (local .m2 repository)

mvn clean install

Run webapp

mvn tomcat7:run The application will be accessible at http://localhost:8081/.

bank-app-kata's People

Contributors

dlresende avatar mfrih avatar aureliesalmon avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.