This is an example of a Grocery Market
The repository contains 3 projects:
- GroceryMarket, which contains all models.
- GroceryMarketTests, which contains tests for the models.
- GroceryMarketConsole, which contains a console app testing the models.
GroceryMarket contains a GroceryStore which will store all products. A Product contains List of Price object, it should always contain a unit price and can have multiple units of volume prices. The PointOfSaleTerminal has a shopping cart of all products it can scan. Then it can calculate the final total price.
GroceryMarketTests has 2 test classes. One for GroceryStore and another for PointOfSaleTerminal. More test classes might be added in the future.
GroceryMarketConsole will open a command prompt, showing the creation of the GroceryStore and PointOfSaleTerminal. Then, it will simulate 3 times scanning of a set of of products.