Giter Site home page Giter Site logo

shopping_cart_tdd_notests's Introduction

ent-tdd-shopping-cart BASIC

You have been hired as a developer at Ali Snobba - a snobby online store where customers purchase high-end merchandise like Louis Vuitton handbags and Rolex watches.

Your job is to implement a shopping cart that stores items while customers are in the process of ordering. Since Ali Snobba is a small company with only one server, you don't need to store the items in Redis or a database - you can keep them in memory.

You also don't need to worry about authentication or session tracking. You can assume that Ali Snobba's infrastructure will handle this for you.

TODO

Implement code to satisfy the acceptance criteria below. There are tests for all requirements in the file CartTest.java in the test tree. You can uncomment them, or, if you are more comfortable, you can test with the main method in App.java.

User Story:

  • As a shopper
  • I want to have a shopping cart
  • So that I can store items until I am ready to checkout

Acceptance Criteria:

  1. Given that I visit the site, when I begin shopping, then I expect my cart to be empty.
  2. Given I have an empty cart, when I add an Item, then I expect to getTotalPrice() reflect the sum of all the Items in my cart.
  3. Given I have an empty cart, when I add items, then I expect itemizedList() reflect the items I have added along with their price.
  4. Given I have an empty cart, when I add more than one of an item, then I expect getTotalPrice() to reflect both the item price and quantity.
  5. Given I have an empty cart, when I add more than one of an item, then I expect itemQuantities() to show the number of items I have added.
  6. Given I have a cart with items that are not on sale, when I add items that are on sale, I expect onSaleItems() to include only the items on sale.

Additional Resources

shopping_cart_tdd_notests's People

Contributors

rlwing avatar maureenmlee avatar andy-a-d-nguyen avatar peterjostiguy 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.