Java - Mockito

From My Limbic Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Annotations

  • @Mock: Mock an object. Doesn't allow to contact real methods implementations
  • @InjectMocks: Inject others mocks declared in the same test into this mock
  • @Spy: Mock an object. Allow to contact real methods implementations
  • @Captor: avoid warnings related capturing complex generic types.