Java - Mockito

From My Limbic Wiki
Revision as of 00:10, 29 November 2019 by Fukakai (talk | contribs) (Page créée avec « =Annotations= * '''@Mock''': Mock an object. Doesn't allow to contact real methods implementations * '''@InjectMocks''': Inject others mocks declared in the same test into... »)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.