Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/maliha-tasnim/python-unit-testing

In this project, Test Driven Development (TDD) is implemented through unit testing. Here several test cases are build to test and debug different interfaces for a dine-out food service.
https://github.com/maliha-tasnim/python-unit-testing

Last synced: about 14 hours ago
JSON representation

In this project, Test Driven Development (TDD) is implemented through unit testing. Here several test cases are build to test and debug different interfaces for a dine-out food service.

Awesome Lists containing this project

README

        

# Python-Unit-Testing
A unit testing project on python which demonstrates different test cases for dineout services of a restaurant.
Dineout class maintains a list of foods that are being dined out for customers.
Dineout class provides interfaces for:
1) Setting the price of individual foods
2) Adding individual fodds to dine out
3) The current total costs for all the foods added
4) Add discounts on selected food items when a particular amount of foods are purchased.

The test cases are as below:
1) Can create an instance of Dineout class
2) Can add a food & food price
3) Can calculate the current total
4) Can add discount rules
5) Exception is thrown for food item added without a price
6) Can add multiple food items and get current total
7) Can apply discount rules to the total