K1Lesson 19 of 49about 180 minutes
Designing for testability
What you learn in this lesson
- recognize why code with Console or the clock inside is hard to test
- pass dependencies in as parameters instead of fetching them inside the method
- make input and output swappable with TextReader and TextWriter
- test a menu with StringReader and StringWriter without a console running
This lesson belongs to course K1
You will see this lesson's text and video once you have bought the course. The goals above show what you learn here.
€149.00
incl. VAT, one-time payment
Access to all of the course's lessons with their exercises, solutions and videos on this site, for 24 months from the purchase. A self-study course: no tutoring, no exams or grading by us, and no certificate.
Sign in and buy