File tree 8 files changed +28
-20
lines changed
spring-test/src/test/java/org/springframework/test/context/bean/override/mockito
8 files changed +28
-20
lines changed Original file line number Diff line number Diff line change 26
26
import static org .assertj .core .api .Assertions .assertThatIllegalStateException ;
27
27
28
28
/**
29
- * Tests for {@link MockitoBean}.
29
+ * Tests for {@link MockitoBean @MockitoBean }.
30
30
*
31
31
* @author Stephane Nicoll
32
32
* @author Sam Brannen
33
33
*/
34
- class MockitoMockBeanTests {
34
+ class MockitoBeanConfigurationErrorTests {
35
35
36
36
@ Test
37
37
void cannotOverrideBeanByNameWithNoSuchBeanName () {
Original file line number Diff line number Diff line change 26
26
import static org .assertj .core .api .Assertions .assertThatIllegalStateException ;
27
27
28
28
/**
29
- * Tests for {@link MockitoSpyBean}.
29
+ * Tests for {@link MockitoSpyBean @MockitoSpyBean }.
30
30
*
31
31
* @author Stephane Nicoll
32
32
*/
33
- class MockitoSpyBeanTests {
33
+ class MockitoSpyBeanConfigurationErrorTests {
34
34
35
35
@ Test
36
36
void contextCustomizerCannotBeCreatedWithNoSuchBeanName () {
Original file line number Diff line number Diff line change 14
14
* limitations under the License.
15
15
*/
16
16
17
- package org .springframework .test .context .bean .override .mockito ;
17
+ package org .springframework .test .context .bean .override .mockito . integration ;
18
18
19
19
import java .util .concurrent .CompletableFuture ;
20
20
28
28
import org .springframework .context .annotation .Configuration ;
29
29
import org .springframework .scheduling .annotation .Async ;
30
30
import org .springframework .scheduling .annotation .EnableAsync ;
31
+ import org .springframework .test .context .bean .override .mockito .MockitoBean ;
31
32
import org .springframework .test .context .junit .jupiter .SpringExtension ;
32
33
33
34
import static java .util .concurrent .CompletableFuture .completedFuture ;
43
44
* @since 6.2
44
45
*/
45
46
@ ExtendWith (SpringExtension .class )
46
- public class MockitoBeanAndAsyncInterfaceMethodTests {
47
+ public class MockitoBeanAndAsyncInterfaceMethodIntegrationTests {
47
48
48
49
@ MockitoBean
49
50
Transformer transformer ;
Original file line number Diff line number Diff line change 14
14
* limitations under the License.
15
15
*/
16
16
17
- package org .springframework .test .context .bean .override .mockito ;
17
+ package org .springframework .test .context .bean .override .mockito . integration ;
18
18
19
19
import org .junit .jupiter .api .BeforeEach ;
20
20
import org .junit .jupiter .api .Test ;
24
24
import org .springframework .test .context .ContextHierarchy ;
25
25
import org .springframework .test .context .bean .override .example .ExampleService ;
26
26
import org .springframework .test .context .bean .override .example .ExampleServiceCaller ;
27
+ import org .springframework .test .context .bean .override .mockito .MockitoBean ;
27
28
import org .springframework .test .context .junit .jupiter .SpringJUnitConfig ;
28
29
29
30
import static org .assertj .core .api .Assertions .assertThat ;
36
37
* @author Sam Brannen
37
38
* @author Phillip Webb
38
39
* @since 6.2
39
- * @see MockitoSpyBeanAndContextHierarchyChildTests
40
+ * @see MockitoSpyBeanAndContextHierarchyChildIntegrationTests
40
41
*/
41
42
@ SpringJUnitConfig
42
- public class MockitoBeanAndContextHierarchyParentTests {
43
+ public class MockitoBeanAndContextHierarchyParentIntegrationTests {
43
44
44
45
@ MockitoBean
45
46
ExampleService service ;
Original file line number Diff line number Diff line change 14
14
* limitations under the License.
15
15
*/
16
16
17
- package org .springframework .test .context .bean .override .mockito ;
17
+ package org .springframework .test .context .bean .override .mockito . integration ;
18
18
19
19
import org .junit .jupiter .api .BeforeEach ;
20
20
import org .junit .jupiter .api .Test ;
28
28
import org .springframework .test .context .bean .override .example .ExampleService ;
29
29
import org .springframework .test .context .bean .override .example .ExampleServiceCaller ;
30
30
import org .springframework .test .context .bean .override .example .FailingExampleService ;
31
+ import org .springframework .test .context .bean .override .mockito .MockitoBean ;
31
32
import org .springframework .test .context .junit .jupiter .SpringExtension ;
32
33
33
34
import static org .assertj .core .api .Assertions .assertThat ;
43
44
* @see <a href="https://github.com/spring-projects/spring-boot/issues/5724">gh-5724</a>
44
45
*/
45
46
@ ExtendWith (SpringExtension .class )
46
- public class MockitoBeanAndScopedProxyTests {
47
+ public class MockitoBeanAndScopedProxyIntegrationTests {
47
48
48
49
@ MockitoBean
49
50
// The ExampleService mock should replace the scoped-proxy FailingExampleService
Original file line number Diff line number Diff line change 14
14
* limitations under the License.
15
15
*/
16
16
17
- package org .springframework .test .context .bean .override .mockito ;
17
+ package org .springframework .test .context .bean .override .mockito . integration ;
18
18
19
19
import org .junit .jupiter .api .RepeatedTest ;
20
20
import org .junit .jupiter .api .extension .ExtendWith ;
30
30
import org .springframework .context .annotation .Bean ;
31
31
import org .springframework .context .annotation .Configuration ;
32
32
import org .springframework .context .annotation .Import ;
33
+ import org .springframework .test .context .bean .override .mockito .MockitoBean ;
33
34
import org .springframework .test .context .junit .jupiter .SpringExtension ;
34
35
35
36
import static org .assertj .core .api .Assertions .assertThat ;
46
47
* @author Phillip Webb
47
48
* @since 6.2
48
49
* @see <a href="https://github.com/spring-projects/spring-boot/issues/5837">5837</a>
49
- * @see MockitoSpyBeanAndSpringAopProxyTests
50
+ * @see MockitoSpyBeanAndSpringAopProxyIntegrationTests
50
51
*/
51
52
@ ExtendWith (SpringExtension .class )
52
- class MockitoBeanAndSpringAopProxyTests {
53
+ class MockitoBeanAndSpringAopProxyIntegrationTests {
53
54
54
55
@ MockitoBean
55
56
DateService dateService ;
Original file line number Diff line number Diff line change 14
14
* limitations under the License.
15
15
*/
16
16
17
- package org .springframework .test .context .bean .override .mockito ;
17
+ package org .springframework .test .context .bean .override .mockito . integration ;
18
18
19
19
import org .junit .jupiter .api .Test ;
20
20
27
27
import org .springframework .test .context .aot .DisabledInAotMode ;
28
28
import org .springframework .test .context .bean .override .example .ExampleService ;
29
29
import org .springframework .test .context .bean .override .example .ExampleServiceCaller ;
30
+ import org .springframework .test .context .bean .override .mockito .MockitoBean ;
31
+ import org .springframework .test .context .bean .override .mockito .MockitoSpyBean ;
30
32
31
33
import static org .assertj .core .api .Assertions .assertThat ;
32
34
38
40
* @author Sam Brannen
39
41
* @author Phillip Webb
40
42
* @since 6.2
41
- * @see MockitoBeanAndContextHierarchyParentTests
43
+ * @see MockitoBeanAndContextHierarchyParentIntegrationTests
42
44
*/
43
45
@ ContextHierarchy (@ ContextConfiguration )
44
46
@ DisabledInAotMode // @ContextHierarchy is not supported in AOT.
45
- public class MockitoSpyBeanAndContextHierarchyChildTests extends MockitoBeanAndContextHierarchyParentTests {
47
+ public class MockitoSpyBeanAndContextHierarchyChildIntegrationTests extends
48
+ MockitoBeanAndContextHierarchyParentIntegrationTests {
46
49
47
50
@ MockitoSpyBean
48
51
ExampleServiceCaller serviceCaller ;
Original file line number Diff line number Diff line change 14
14
* limitations under the License.
15
15
*/
16
16
17
- package org .springframework .test .context .bean .override .mockito ;
17
+ package org .springframework .test .context .bean .override .mockito . integration ;
18
18
19
19
import org .junit .jupiter .api .BeforeEach ;
20
20
import org .junit .jupiter .api .Disabled ;
33
33
import org .springframework .context .annotation .Bean ;
34
34
import org .springframework .context .annotation .Configuration ;
35
35
import org .springframework .context .annotation .Import ;
36
+ import org .springframework .test .context .bean .override .mockito .MockitoSpyBean ;
36
37
import org .springframework .test .context .junit .jupiter .SpringExtension ;
37
38
import org .springframework .test .util .AopTestUtils ;
38
39
51
52
* @author Phillip Webb
52
53
* @since 6.2
53
54
* @see <a href="https://github.com/spring-projects/spring-boot/issues/5837">5837</a>
54
- * @see MockitoBeanAndSpringAopProxyTests
55
+ * @see MockitoBeanAndSpringAopProxyIntegrationTests
55
56
*/
56
57
@ ExtendWith (SpringExtension .class )
57
- class MockitoSpyBeanAndSpringAopProxyTests {
58
+ class MockitoSpyBeanAndSpringAopProxyIntegrationTests {
58
59
59
60
@ MockitoSpyBean
60
61
DateService dateService ;
You can’t perform that action at this time.
0 commit comments