
MOCKITO COOKBOOK
By :

As explained in the previous chapters, Mockito is all about creating mocks and stubbing their behavior. It's worth taking another look at the differences between mocks and stubs in order to properly distinguish possible actions that can be taken on either of them. In his xUnit patterns (http://xunitpatterns.com/Test%20Double%20Patterns.html), Gerard Meszaros describes stubs and mocks as follows:
Mockito does not distinguish this separation, so each test double, regardless of its purpose, is considered to be a mock. This chapter will focus on showing you numerous ways of the stubbing behavior of mocks in order to simulate real interactions. We'll cover stubbing methods that return values and those that are void. We'll simulate...
Change the font size
Change margin width
Change background colour