Giter Club home page Giter Club logo

outside-in-kata's Introduction

Kata

Stock portfolio

Implement the following user story using Outside-In TDD starting from an acceptance test.

Portfolio User Story

As a customer of our stock exchange broker

I would like to see my current portfolio

So I can better plan my financial strategy

Portfolio scenario

We need to provide a class able to record the buy and sell operations of a customer and display the information as per the acceptance criteria. For simplicity, you can assume it should work for just one user at a time.

Print portfolio criteria

Given I bought 1000 shares of "Old School Waterfall Software LTD" on 14/02/1990

and I bought 400 shares of "Crafter Masters Limited" on 09/06/2016

and I bought 700 shares of "XP Practitioners Incorporated" on 10/12/2018

and I sold 500 shares of "Old School Waterfall Software LTD" on 11/12/2018

and the current share value of "Old School Waterfall Software LTD" is $5.75

and the current share value of "Crafter Masters Limited" is $17.25

and the current share value of "XP Practitioners Incorporated" is $25.55

When I print my current portfolio

Then the outcome displayed should be:

company | shares | current price | current value | last operation

Old School Waterfall Software LTD | 500 | $5.75 | $2,875.00 | sold 500 on 11/12/2018

Crafter Masters Limited | 400 | $17.25 | $6,900.00 | bought 400 on 09/06/2016

XP Practitioners Incorporated | 700 | $25.55 | $17,885.00 | bought 700 on 10/12/2018

Sorted by first operation date ascending.

outside-in-kata's People

Contributors

conso 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.