Java - Mockito

De My Limbic Wiki
Révision datée du 29 novembre 2019 à 00:10 par Fukakai (discussion | contributions) (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) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
Aller à : navigation, rechercher

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.