O'Reilly logo

Mastering Application Development with Force.com by Kevin J. Poorman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

Throughout this chapter, we covered in great detail the why, when, and how of writing unit tests. There's a lot of information and nuance in this chapter. However, I hope you can walk away with not only a grasp of the fundamental pattern for unit testing, but also its three subpatterns of positive, negative, and permissions-based testing. Remember as well that a test method without at least one assert method is a liability. Furthermore, it's likely not going to be useful in the long run. Use asserts liberally. Assert not only the expected response of the unit of code, but also the data you created. Once your tests are written and passing, you'll be able to deploy your code to production. We'll talk about deployment strategies in our next ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required