Deprecate @MockBean and @SpyBean

- Deprecate Deprecate @MockBean and @SpyBean in favor of Spring
  Framework 6.2's @MockitoBean and @MockitoSpy
- Migrate usages of @MockBean and @SpyBean to @MockitoBean and
  @MockitoSpy

Signed-off-by: Jakob Wanger <jakobwanger@gmail.com>

See gh-39864
This commit is contained in:
Jakob Wanger
2024-03-10 19:42:45 -04:00
committed by Andy Wilkinson
parent acdaa6dc35
commit 24763940a0
38 changed files with 87 additions and 33 deletions

View File

@@ -27,6 +27,7 @@ import org.springframework.boot.test.context.nestedtests.InheritedNestedTestConf
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.context.annotation.Import;
import org.springframework.stereotype.Component;
import org.springframework.test.bean.override.mockito.MockitoBean;
import static org.mockito.BDDMockito.then;
import static org.mockito.Mockito.times;
@@ -41,7 +42,7 @@ import static org.mockito.Mockito.times;
@Import(ActionPerformer.class)
class InheritedNestedTestConfigurationTests {
@MockBean
@MockitoBean
Action action;
@Autowired