File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
documentation/src/docs/asciidoc Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -209,21 +209,22 @@ Other parameter resolvers must be explicitly enabled by registering appropriate
209209[source,java,indent=0]
210210[subs="verbatim"]
211211----
212+ import com.example.mockito.MockitoExtension;
212213import org.junit.jupiter.api.*;
214+ import org.mockito.Mock;
213215
214216import static org.mockito.Mockito.when;
215- import com.example.mockito.MockitoExtension;
216217
217218@ExtendWith(MockitoExtension.class)
218219class MyMockitoTest {
219220
220221 @BeforeEach
221- void init(@InjectMock Person person) {
222+ void init(@Mock Person person) {
222223 when(person.getName()).thenReturn("Dilbert");
223224 }
224225
225226 @Test
226- void simpleTestWithInjectedMock(@InjectMock Person person) {
227+ void simpleTestWithInjectedMock(@Mock Person person) {
227228 assertEquals("Dilbert", person.getName());
228229 }
229230
You can’t perform that action at this time.
0 commit comments