I'm verifying with mockito that a method has been called. The method:
public void createButtons(final List<Button> buttonsConfiguration) {...}
Since It doesn't matter which list is passed I verify that the method is called as follows:
verify(mock).createButtons(Matchers.anyListOf(Button.class));
But, the size of the List
is important. So, it doesn't matter which List
but the list has to have X elements.
Is that possible at all?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…