Java Bootcamp – Workbooks and Challenges
)}

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


Screen Shot 2021-07-04 at 10.18.19 PM.png

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.8
38 students
5

92%
4

3%
3

0%
2

0%
1

5%
Written Reviews
There are no written reviews yet.