Android 4.2.2 release 1.2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEABECAAYFAlFu/zAACgkQ6K0/gZqxDniv8wCbBFJUksXmG4/I/pAIoUfcr9Pl
6ngAn1yQbC+PYaQhsc1L/iNIX29ZWvPJ
=bCmQ
-----END PGP SIGNATURE-----
Support for primitive (non-Object) captors in littlemock

The LittleMock captor does not support primitive types
such as int -- the respective code crashes with a
NullPointerException.

This CL implements an approach for avoiding this problem
in a way that stays as close to Mockito syntax as possible:

- the generic capture() works for primitives as well;

- we create the ArgumentCaptor with the same basic approach
  as Mockito does it, from a class object of type T:

  <T> ArgumentCaptor<T> LittleMock.createCaptor(Class<T> clazz)

  ( Mockito uses ArgumentCaptor.forClass(Class<T> clazz) )

Change-Id: Ie8c234466e63adf533d863be2b74d3516ecc9947
2 files changed