Movie Store – Part 1
Test-Driven Development: write tests before writing code.
Unit testing results in modular code. Modular code is:
- easy to test.
- immune to bugs.
- easy to understand.
- scalable.
Setup
Test Cases
Inside requirements.txt
, identify meaningful test cases:
- adding a movie
[identify test case 1]
- selling a movie
[identify test case 2]
[identify state exception test case]
- renting a movie
[identify test case 4]
- returning a movie
[identify test case 5]
Should I test getters/setters/constructors? No. They don't offer meaningful logic that's worth unit testing.
Good Luck!
Feedback Summary
4.7
43 students
5
91%
4
2%
3
0%
2
0%
1
7%
Written Reviews
There are no written reviews yet.