Open
Description
@Test
internal fun `some testing`() {
val pong = Pong()
whenever(mock.ping()).thenReturn(pong)
assertThat(pingService.sendPing()).isEqualTo(pong)
// this verification is already defined by whenever(...)
verify(mock).ping()
// but is is needed, because otherwise this will fail
verifyNoMoreInteractions(mock)
}
It will be reduce code if verifyNoMoreInteractions
will not check whenever
-calls or this could be configurable by an optional parameter.