Summary and Quiz: Writing Our First Test

Test your knowledge of writing test codes.

We'll cover the following

Chapter’s recap

We’ve taken our first steps into TDD and learned about the AAA structure of each test. We’ve seen how it’s possible to design our software and write our test before our production code and get cleaner, more modular designs as a result. We learned what makes for a good test and learned some common techniques used to catch common programming errors and test code that throws exceptions.

It’s important to understand the flow of using AAA sections inside our FIRST tests because this gives us a template we can reliably follow. It’s also important to understand the flow of design ideas, as used in the previous Wordz example. Writing our tests is literally taking the design decisions we make and capturing them in unit test code. This provides fast feedback on how clean our design is, as well as providing an executable specification for future readers of our code.

Quiz

Get hands-on with 1200+ tech skills courses.