spyk
Builds a new spy for specified class. Initializes object via default constructor.
A spy is a special kind of mockk that enables a mix of mocked behaviour and real behaviour. A part of the behaviour may be mocked using every, but any non-mocked behaviour will call the original method.
Parameters
spyk name
additional interfaces for this spyk to implement, in addition to the specified class.
allows this spyk to record any private calls, enabling a verification.
block to execute after spyk is created with spyk as a receiver. Similar to using apply on the spyk object.
Builds a new spy for specified class, copying fields from objToCopy.
A spy is a special kind of mockk that enables a mix of mocked behaviour and real behaviour. A part of the behaviour may be mocked using every, but any non-mocked behaviour will call the original method.
Parameters
spyk name
additional interfaces for this spyk to implement, in addition to the specified class.
allows this spyk to record any private calls, enabling a verification.
block to execute after spyk is created with spyk as a receiver. Similar to using apply on the spyk object.