Chapter 9. Integration Testing with Mockito and DI Frameworks

In this chapter, we will cover the following recipes:

  • Injecting test doubles instead of beans using Spring's code configuration
  • Injecting test doubles instead of beans using Spring's XML configuration
  • Injecting test doubles instead of beans using Springockito
  • Injecting test doubles instead of beans with Guice
  • Injecting test doubles instead of beans with Guice using Jukito

Introduction

Dependency Injection (DI) and Inversion of Control (IOC) are the terms that you have to understand to get the most out of the contents of this chapter (for more information, refer to Martin Fowler's article at http://martinfowler.com/articles/injection.html). We will not elaborate on the importance of those ...

Get Mockito Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.