mockito: Mockito 5 lab (inline mock maker, static/construction mocking, captors, BDD, strict stubs)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Cfo2K4u4rF18QsPXPFnytf
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
org.mockito.exceptions.base.MockitoException:
|
||||
No argument value was captured!
|
||||
You might have forgotten to use argument.capture() in verify()...
|
||||
...or you used capture() in stubbing but stubbed method was not called.
|
||||
Be aware that it is recommended to use capture() only with verify()
|
||||
|
||||
Examples of correct argument capturing:
|
||||
ArgumentCaptor<Person> argument = ArgumentCaptor.forClass(Person.class);
|
||||
verify(mock).doSomething(argument.capture());
|
||||
assertEquals("John", argument.getValue().getName());
|
||||
|
||||
Reference in New Issue
Block a user