Mockito ArgumentCaptor verify that nothing is captured

Viewed 300

I need to verify that the ArgumentCaptor has not captured anything. Is there any way to verify this?

Mockito.verify( /* captor has not captured anything */ )
1 Answers

You can verify that the number of captured values is equal to zero.

Assert.assertEquals(0, captor.getAllValues().size());
Related