Skip to content

Commit 52e5b45

Browse files
committed
Merge pull request #45887 from ngocnhan-tran1996
* pr/45887: Update javadoc of test slice annotations to suggest MockitoBean rather than MockBean Closes gh-45887
2 parents ec3eeb7 + 8fcc1dd commit 52e5b45

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/graphql/GraphQlTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@
6565
* {@link AutoConfigureGraphQlTester @AutoConfigureGraphQlTester}.
6666
* <p>
6767
* Typically {@code @GraphQlTest} is used in combination with
68-
* {@link org.springframework.boot.test.mock.mockito.MockBean @MockBean} or
69-
* {@link org.springframework.context.annotation.Import @Import} to load any collaborators
70-
* and other components required for the tests.
68+
* {@link org.springframework.test.context.bean.override.mockito.MockitoBean @MockitoBean}
69+
* or {@link org.springframework.context.annotation.Import @Import} to load any
70+
* collaborators and other components required for the tests.
7171
* <p>
7272
* To load your full application configuration instead and test via
7373
* {@code HttpGraphQlTester}, consider using

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/reactive/WebFluxTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -68,9 +68,9 @@
6868
* {@link AutoConfigureWebTestClient @AutoConfigureWebTestClient} annotation can be used.
6969
* <p>
7070
* Typically {@code @WebFluxTest} is used in combination with
71-
* {@link org.springframework.boot.test.mock.mockito.MockBean @MockBean} or
72-
* {@link Import @Import} to create any collaborators required by your {@code @Controller}
73-
* beans.
71+
* {@link org.springframework.test.context.bean.override.mockito.MockitoBean @MockitoBean}
72+
* or {@link Import @Import} to create any collaborators required by your
73+
* {@code @Controller} beans.
7474
* <p>
7575
* If you are looking to load your full application configuration and use WebTestClient,
7676
* you should consider {@link SpringBootTest @SpringBootTest} combined with

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/WebMvcTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -76,9 +76,9 @@
7676
* {@link AutoConfigureMockMvc @AutoConfigureMockMvc} annotation can be used.
7777
* <p>
7878
* Typically {@code @WebMvcTest} is used in combination with
79-
* {@link org.springframework.boot.test.mock.mockito.MockBean @MockBean} or
80-
* {@link Import @Import} to create any collaborators required by your {@code @Controller}
81-
* beans.
79+
* {@link org.springframework.test.context.bean.override.mockito.MockitoBean @MockitoBean}
80+
* or {@link Import @Import} to create any collaborators required by your
81+
* {@code @Controller} beans.
8282
* <p>
8383
* If you are looking to load your full application configuration and use MockMVC, you
8484
* should consider {@link SpringBootTest @SpringBootTest} combined with

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/webservices/server/WebServiceServerTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -51,8 +51,8 @@
5151
* </ul>
5252
* <p>
5353
* Typically {@code WebServiceServerTest} is used in combination with
54-
* {@link org.springframework.boot.test.mock.mockito.MockBean @MockBean} or
55-
* {@link org.springframework.context.annotation.Import @Import} to create any
54+
* {@link org.springframework.test.context.bean.override.mockito.MockitoBean @MockitoBean}
55+
* or {@link org.springframework.context.annotation.Import @Import} to create any
5656
* collaborators required by your {@code Endpoint} beans.
5757
* <p>
5858
* If you are looking to load your full application configuration and use

0 commit comments

Comments
 (0)