Mockito Concepts: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 20: Line 20:
* Primitive types
* Primitive types
[[PowerMock]] can mock these constructs.
[[PowerMock]] can mock these constructs.
=Managed Test Double=
A [[Software Testing Concepts#Test_Double|test double]] managed by Mockito.

Revision as of 04:24, 16 July 2021

Internal

Overview

MockitoJUnitRunner

Mockito.mock()

Programming Model | API

@Mock

Programming Model | Annotations

Can't Mock

  • Final classes
  • Final methods
  • Enums
  • Static methods
  • Private methods
  • hashCode() and equals() methods
  • Anonymous classes
  • Primitive types

PowerMock can mock these constructs.

Managed Test Double

A test double managed by Mockito.