Chapter 10. Building confidence with testing
This chapter covers
- Automated testing using ScalaCheck
- Using JUnit to test Scala code
- Writing better tests with dependency injection
- Behavior-driven development using Specs
- Testing actor-based systems
So far, I’ve been showing you code without writing tests—so why worry about that right now? The answer is, I wrote tests around the code but didn’t mention doing so because I wanted you to focus more on the Scala language. Now that’s going to change. My goal for this chapter is to make you comfortable writing automated tests in Scala so that you can build production-quality software.
The path to writing well-crafted code is the path where you write tests for your code. The common perception ...