From ca6a321b872fb65e64aa9fa42e9c44fc664319f6 Mon Sep 17 00:00:00 2001 From: Moritz Halbritter Date: Wed, 17 Apr 2024 14:34:03 +0200 Subject: [PATCH] Pull the whole "Testing" documentation section up to the top level Closes gh-38361 --- .../antora/modules/ROOT/pages/redirect.adoc | 108 ++-- .../reference/pages/actuator/tracing.adoc | 2 +- .../pages/features/dev-services.adoc | 8 +- .../pages/features/external-config.adoc | 2 +- .../reference/pages/features/kotlin.adoc | 2 +- .../testing-native-applications.adoc | 2 +- .../reference/pages/testing/index.adoc | 30 ++ .../pages/testing/spring-applications.adoc | 14 + .../spring-boot-applications.adoc} | 485 ++++-------------- .../testing/test-scope-dependencies.adoc | 16 + .../pages/testing/test-utilities.adoc | 69 +++ .../pages/testing/testcontainers.adoc | 129 +++++ ...-the-springbootapplication-annotation.adoc | 2 +- .../reference/partials/nav-reference.adoc | 8 +- .../MyJdbcTests.java | 4 +- .../MyTransactionalTests.java | 4 +- .../autoconfiguredjooq/MyJooqTests.java | 4 +- .../MyRestClientServiceTests.java | 4 +- .../MyRestTemplateServiceTests.java | 6 +- .../RemoteVehicleDetailsService.java | 4 +- .../MyDataCassandraTests.java | 4 +- .../SomeRepository.java | 4 +- .../MyDataCouchbaseTests.java | 4 +- .../SomeRepository.java | 4 +- .../MyDataElasticsearchTests.java | 4 +- .../SomeRepository.java | 4 +- .../MyNonTransactionalTests.java | 4 +- .../withdb/MyRepositoryTests.java | 4 +- .../withoutdb/MyRepositoryTests.java | 4 +- .../withoutdb/User.java | 4 +- .../withoutdb/UserRepository.java | 4 +- .../inmemory/MyDataLdapTests.java | 4 +- .../server/MyDataLdapTests.java | 4 +- .../MyDataMongoDbTests.java | 4 +- .../nopropagation/MyDataNeo4jTests.java | 4 +- .../propagation/MyDataNeo4jTests.java | 4 +- .../propagation}/SomeRepository.java | 4 +- .../MyDataRedisTests.java | 4 +- .../SomeRepository.java | 4 +- .../withmockmvc/MyRestDocsConfiguration.java | 4 +- .../MyResultHandlerConfiguration.java | 4 +- .../withmockmvc/MyUserDocumentationTests.java | 4 +- .../withmockmvc/UserController.java | 4 +- .../MyRestDocsConfiguration.java | 4 +- .../MyUserDocumentationTests.java | 4 +- .../MyRestDocsConfiguration.java | 4 +- .../MyUsersDocumentationTests.java | 4 +- ...tClientBuilderCustomizerConfiguration.java | 4 +- .../client/MyWebServiceClientTests.java | 4 +- .../client/Request.java | 4 +- .../client/Response.java | 4 +- .../client/SomeWebService.java | 4 +- .../server/ExampleEndpoint.java | 4 +- .../server/MyWebServiceServerTests.java | 5 +- .../detectingwebapptype/MyWebFluxTests.java | 4 +- .../excludingconfiguration/MyTests.java | 4 +- .../MyTestsConfiguration.java | 4 +- .../jmx/MyJmxTests.java | 4 +- .../springbootapplications/jmx/SampleApp.java | 4 +- .../jsontests/MyJsonAssertJTests.java | 4 +- .../jsontests/MyJsonTests.java | 4 +- .../jsontests/SomeObject.java | 4 +- .../jsontests/VehicleDetails.java | 4 +- .../mockingbeans/bean/MyTests.java | 4 +- .../mockingbeans/bean/RemoteService.java | 4 +- .../mockingbeans/bean/Reverser.java | 4 +- .../mockingbeans/listener/MyConfig.java | 4 +- .../mockingbeans/listener/MyTests.java | 4 +- .../GraphQlIntegrationTests.java | 4 +- .../GreetingControllerTests.java | 4 +- .../springmvctests/MyControllerTests.java | 5 +- .../springmvctests/MyHtmlUnitTests.java | 5 +- .../springmvctests/UserVehicleController.java | 4 +- .../springmvctests/UserVehicleService.java | 4 +- .../springmvctests/VehicleDetails.java | 4 +- .../springwebfluxtests/MyControllerTests.java | 5 +- .../UserVehicleController.java | 4 +- .../UserVehicleService.java | 4 +- .../springwebfluxtests/VehicleDetails.java | 4 +- .../MyApplication.java | 4 +- .../MyMongoConfiguration.java | 4 +- .../MyWebConfiguration.java | 4 +- .../MyWebMvcConfigurer.java | 4 +- .../scan/MyApplication.java | 4 +- .../MyApplicationArgumentTests.java | 4 +- .../usingmain/always/MyApplicationTests.java | 4 +- .../usingmain/custom/MyApplication.java | 4 +- .../usingmain/typical/MyApplication.java | 4 +- .../withmockenvironment/MyMockMvcTests.java | 4 +- .../MyMockWebTestClientTests.java | 4 +- .../MyRandomPortTestRestTemplateTests.java | 4 +- .../MyRandomPortWebTestClientTests.java | 4 +- .../dynamicproperties/MyIntegrationTests.java | 4 +- .../MyIntegrationTests.java | 4 +- .../MyRedisConfiguration.java | 4 +- .../vanilla/MyIntegrationTests.java | 4 +- .../Config.java | 4 +- .../MyConfigFileTests.java | 4 +- .../outputcapture/MyOutputCaptureTests.java | 4 +- .../MyEnvironmentTests.java | 4 +- .../testresttemplate/MySpringBootTests.java | 4 +- .../MySpringBootTestsConfiguration.java | 2 +- .../utilities/testresttemplate/MyTests.java | 4 +- .../jmx/MyJmxTestsTests.java | 4 +- .../MyOutputCaptureTestsTests.java | 4 +- .../MySpringBootTestsTests.java | 4 +- 106 files changed, 622 insertions(+), 627 deletions(-) create mode 100644 spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/index.adoc create mode 100644 spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/spring-applications.adoc rename spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/{features/testing.adoc => testing/spring-boot-applications.adoc} (69%) create mode 100644 spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/test-scope-dependencies.adoc create mode 100644 spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/test-utilities.adoc create mode 100644 spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/testcontainers.adoc rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/additionalautoconfigurationandslicing/MyJdbcTests.java (83%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredjdbc/MyTransactionalTests.java (84%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredjooq/MyJooqTests.java (84%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredrestclient/MyRestClientServiceTests.java (90%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredrestclient/MyRestTemplateServiceTests.java (84%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredrestclient/RemoteVehicleDetailsService.java (80%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredspringdatacassandra/MyDataCassandraTests.java (83%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features/testing/springbootapplications/autoconfiguredspringdataredis => testing/springbootapplications/autoconfiguredspringdatacassandra}/SomeRepository.java (78%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredspringdatacouchbase/MyDataCouchbaseTests.java (83%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features/testing/springbootapplications/autoconfiguredspringdatacassandra => testing/springbootapplications/autoconfiguredspringdatacouchbase}/SomeRepository.java (78%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredspringdataelasticsearch/MyDataElasticsearchTests.java (83%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredspringdataelasticsearch/SomeRepository.java (77%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredspringdatajpa/MyNonTransactionalTests.java (84%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredspringdatajpa/withdb/MyRepositoryTests.java (84%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredspringdatajpa/withoutdb/MyRepositoryTests.java (88%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredspringdatajpa/withoutdb/User.java (80%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredspringdatajpa/withoutdb/UserRepository.java (78%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredspringdataldap/inmemory/MyDataLdapTests.java (83%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredspringdataldap/server/MyDataLdapTests.java (83%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredspringdatamongodb/MyDataMongoDbTests.java (84%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredspringdataneo4j/nopropagation/MyDataNeo4jTests.java (83%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredspringdataneo4j/propagation/MyDataNeo4jTests.java (82%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features/testing/springbootapplications/autoconfiguredspringdatacouchbase => testing/springbootapplications/autoconfiguredspringdataneo4j/propagation}/SomeRepository.java (78%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredspringdataredis/MyDataRedisTests.java (83%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features/testing/springbootapplications/autoconfiguredspringdataneo4j/propagation => testing/springbootapplications/autoconfiguredspringdataredis}/SomeRepository.java (77%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/MyRestDocsConfiguration.java (87%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/MyResultHandlerConfiguration.java (85%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/MyUserDocumentationTests.java (89%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/UserController.java (77%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredspringrestdocs/withrestassured/MyRestDocsConfiguration.java (86%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredspringrestdocs/withrestassured/MyUserDocumentationTests.java (89%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredspringrestdocs/withwebtestclient/MyRestDocsConfiguration.java (86%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredspringrestdocs/withwebtestclient/MyUsersDocumentationTests.java (88%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredspringrestdocs/withwebtestclient/MyWebTestClientBuilderCustomizerConfiguration.java (86%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredwebservices/client/MyWebServiceClientTests.java (90%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredwebservices/client/Request.java (80%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredwebservices/client/Response.java (84%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredwebservices/client/SomeWebService.java (86%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredwebservices/server/ExampleEndpoint.java (86%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/autoconfiguredwebservices/server/MyWebServiceServerTests.java (83%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/detectingwebapptype/MyWebFluxTests.java (82%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/excludingconfiguration/MyTests.java (84%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/excludingconfiguration/MyTestsConfiguration.java (79%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/jmx/MyJmxTests.java (89%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/jmx/SampleApp.java (86%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/jsontests/MyJsonAssertJTests.java (90%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/jsontests/MyJsonTests.java (92%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/jsontests/SomeObject.java (81%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/jsontests/VehicleDetails.java (85%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/mockingbeans/bean/MyTests.java (89%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/mockingbeans/bean/RemoteService.java (80%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/mockingbeans/bean/Reverser.java (80%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/mockingbeans/listener/MyConfig.java (79%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/mockingbeans/listener/MyTests.java (86%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/springgraphqltests/GraphQlIntegrationTests.java (90%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/springgraphqltests/GreetingControllerTests.java (90%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/springmvctests/MyControllerTests.java (87%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/springmvctests/MyHtmlUnitTests.java (85%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/springmvctests/UserVehicleController.java (80%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/springmvctests/UserVehicleService.java (81%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/springmvctests/VehicleDetails.java (81%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/springwebfluxtests/MyControllerTests.java (85%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/springwebfluxtests/UserVehicleController.java (79%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/springwebfluxtests/UserVehicleService.java (81%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/springwebfluxtests/VehicleDetails.java (80%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/userconfigurationandslicing/MyApplication.java (83%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/userconfigurationandslicing/MyMongoConfiguration.java (83%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/userconfigurationandslicing/MyWebConfiguration.java (85%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/userconfigurationandslicing/MyWebMvcConfigurer.java (82%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/userconfigurationandslicing/scan/MyApplication.java (83%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/usingapplicationarguments/MyApplicationArgumentTests.java (87%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/usingmain/always/MyApplicationTests.java (85%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/usingmain/custom/MyApplication.java (87%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/usingmain/typical/MyApplication.java (84%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/withmockenvironment/MyMockMvcTests.java (91%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/withmockenvironment/MyMockWebTestClientTests.java (88%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/withrunningserver/MyRandomPortTestRestTemplateTests.java (88%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/withrunningserver/MyRandomPortWebTestClientTests.java (88%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/testcontainers/dynamicproperties/MyIntegrationTests.java (89%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/testcontainers/serviceconnections/MyIntegrationTests.java (88%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/testcontainers/serviceconnections/MyRedisConfiguration.java (87%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/testcontainers/vanilla/MyIntegrationTests.java (88%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/utilities/configdataapplicationcontextinitializer/Config.java (78%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/utilities/configdataapplicationcontextinitializer/MyConfigFileTests.java (84%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/utilities/outputcapture/MyOutputCaptureTests.java (88%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/utilities/testpropertyvalues/MyEnvironmentTests.java (88%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/utilities/testresttemplate/MySpringBootTests.java (92%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/utilities/testresttemplate/MySpringBootTestsConfiguration.java (95%) rename spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/{features => }/testing/utilities/testresttemplate/MyTests.java (88%) rename spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/{features => }/testing/springbootapplications/jmx/MyJmxTestsTests.java (83%) rename spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/{features => }/testing/utilities/outputcapture/MyOutputCaptureTestsTests.java (84%) rename spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/{features => }/testing/utilities/testresttemplate/MySpringBootTestsTests.java (83%) diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/ROOT/pages/redirect.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/ROOT/pages/redirect.adoc index df0f242bb9..0b9f44a7e2 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/ROOT/pages/redirect.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/ROOT/pages/redirect.adoc @@ -1159,60 +1159,60 @@ * xref:reference:features/dev-services.adoc#features.dev-services.testcontainers.at-development-time.devtools[#features.testcontainers.at-development-time.devtools] * xref:reference:features/dev-services.adoc#features.dev-services.testcontainers.at-development-time.dynamic-properties[#features.testcontainers.at-development-time.dynamic-properties] * xref:reference:features/dev-services.adoc#features.dev-services.testcontainers.at-development-time.importing-container-declarations[#features.testcontainers.at-development-time.importing-container-declarations] -* xref:reference:features/testing.adoc#features.testing[#features.testing] -* xref:reference:features/testing.adoc#features.testing.spring-applications[#features.testing.spring-applications] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications[#features.testing.spring-boot-applications] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.additional-autoconfiguration-and-slicing[#features.testing.spring-boot-applications.additional-autoconfiguration-and-slicing] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-jdbc[#features.testing.spring-boot-applications.autoconfigured-jdbc] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-jooq[#features.testing.spring-boot-applications.autoconfigured-jooq] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-rest-client[#features.testing.spring-boot-applications.autoconfigured-rest-client] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-spring-data-cassandra[#features.testing.spring-boot-applications.autoconfigured-spring-data-cassandra] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-spring-data-couchbase[#features.testing.spring-boot-applications.autoconfigured-spring-data-couchbase] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-spring-data-elasticsearch[#features.testing.spring-boot-applications.autoconfigured-spring-data-elasticsearch] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-spring-data-jdbc[#features.testing.spring-boot-applications.autoconfigured-spring-data-jdbc] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-spring-data-jpa[#features.testing.spring-boot-applications.autoconfigured-spring-data-jpa] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-spring-data-ldap[#features.testing.spring-boot-applications.autoconfigured-spring-data-ldap] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-spring-data-mongodb[#features.testing.spring-boot-applications.autoconfigured-spring-data-mongodb] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-spring-data-neo4j[#features.testing.spring-boot-applications.autoconfigured-spring-data-neo4j] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-spring-data-r2dbc[#features.testing.spring-boot-applications.autoconfigured-spring-data-r2dbc] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-spring-data-redis[#features.testing.spring-boot-applications.autoconfigured-spring-data-redis] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-spring-restdocs[#features.testing.spring-boot-applications.autoconfigured-spring-restdocs] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-spring-restdocs.with-mock-mvc[#features.testing.spring-boot-applications.autoconfigured-spring-restdocs.with-mock-mvc] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-spring-restdocs.with-rest-assured[#features.testing.spring-boot-applications.autoconfigured-spring-restdocs.with-rest-assured] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-spring-restdocs.with-web-test-client[#features.testing.spring-boot-applications.autoconfigured-spring-restdocs.with-web-test-client] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-tests[#features.testing.spring-boot-applications.autoconfigured-tests] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-webservices[#features.testing.spring-boot-applications.autoconfigured-webservices] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-webservices.client[#features.testing.spring-boot-applications.autoconfigured-webservices.client] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-webservices.server[#features.testing.spring-boot-applications.autoconfigured-webservices.server] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.customizing-web-test-client[#features.testing.spring-boot-applications.customizing-web-test-client] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.detecting-configuration[#features.testing.spring-boot-applications.detecting-configuration] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.detecting-web-app-type[#features.testing.spring-boot-applications.detecting-web-app-type] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.excluding-configuration[#features.testing.spring-boot-applications.excluding-configuration] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.jmx[#features.testing.spring-boot-applications.jmx] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.json-tests[#features.testing.spring-boot-applications.json-tests] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.metrics[#features.testing.spring-boot-applications.metrics] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.mocking-beans[#features.testing.spring-boot-applications.mocking-beans] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.observations[#features.testing.spring-boot-applications.observations] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.spock[#features.testing.spring-boot-applications.spock] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.spring-graphql-tests[#features.testing.spring-boot-applications.spring-graphql-tests] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.spring-mvc-tests[#features.testing.spring-boot-applications.spring-mvc-tests] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.spring-webflux-tests[#features.testing.spring-boot-applications.spring-webflux-tests] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.tracing[#features.testing.spring-boot-applications.tracing] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.user-configuration-and-slicing[#features.testing.spring-boot-applications.user-configuration-and-slicing] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.using-application-arguments[#features.testing.spring-boot-applications.using-application-arguments] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.using-main[#features.testing.spring-boot-applications.using-main] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.with-mock-environment[#features.testing.spring-boot-applications.with-mock-environment] -* xref:reference:features/testing.adoc#features.testing.spring-boot-applications.with-running-server[#features.testing.spring-boot-applications.with-running-server] -* xref:reference:features/testing.adoc#features.testing.test-scope-dependencies[#features.testing.test-scope-dependencies] -* xref:reference:features/testing.adoc#features.testing.testcontainers[#features.testing.testcontainers] -* xref:reference:features/testing.adoc#features.testing.testcontainers[#howto-testcontainers] -* xref:reference:features/testing.adoc#features.testing.testcontainers.dynamic-properties[#features.testing.testcontainers.dynamic-properties] -* xref:reference:features/testing.adoc#features.testing.testcontainers.service-connections[#features.testing.testcontainers.service-connections] -* xref:reference:features/testing.adoc#features.testing.utilities[#features.testing.utilities] -* xref:reference:features/testing.adoc#features.testing.utilities.config-data-application-context-initializer[#features.testing.utilities.config-data-application-context-initializer] -* xref:reference:features/testing.adoc#features.testing.utilities.output-capture[#features.testing.utilities.output-capture] -* xref:reference:features/testing.adoc#features.testing.utilities.test-property-values[#features.testing.utilities.test-property-values] -* xref:reference:features/testing.adoc#features.testing.utilities.test-rest-template[#features.testing.utilities.test-rest-template] +* xref:reference:testing/index.adoc#testing[#features.testing] +* xref:reference:testing/spring-applications.adoc#testing.spring-applications[#features.testing.spring-applications] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications[#features.testing.spring-boot-applications] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.additional-autoconfiguration-and-slicing[#features.testing.spring-boot-applications.additional-autoconfiguration-and-slicing] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-jdbc[#features.testing.spring-boot-applications.autoconfigured-jdbc] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-jooq[#features.testing.spring-boot-applications.autoconfigured-jooq] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-rest-client[#features.testing.spring-boot-applications.autoconfigured-rest-client] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-spring-data-cassandra[#features.testing.spring-boot-applications.autoconfigured-spring-data-cassandra] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-spring-data-couchbase[#features.testing.spring-boot-applications.autoconfigured-spring-data-couchbase] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-spring-data-elasticsearch[#features.testing.spring-boot-applications.autoconfigured-spring-data-elasticsearch] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-spring-data-jdbc[#features.testing.spring-boot-applications.autoconfigured-spring-data-jdbc] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-spring-data-jpa[#features.testing.spring-boot-applications.autoconfigured-spring-data-jpa] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-spring-data-ldap[#features.testing.spring-boot-applications.autoconfigured-spring-data-ldap] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-spring-data-mongodb[#features.testing.spring-boot-applications.autoconfigured-spring-data-mongodb] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-spring-data-neo4j[#features.testing.spring-boot-applications.autoconfigured-spring-data-neo4j] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-spring-data-r2dbc[#features.testing.spring-boot-applications.autoconfigured-spring-data-r2dbc] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-spring-data-redis[#features.testing.spring-boot-applications.autoconfigured-spring-data-redis] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-spring-restdocs[#features.testing.spring-boot-applications.autoconfigured-spring-restdocs] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-spring-restdocs.with-mock-mvc[#features.testing.spring-boot-applications.autoconfigured-spring-restdocs.with-mock-mvc] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-spring-restdocs.with-rest-assured[#features.testing.spring-boot-applications.autoconfigured-spring-restdocs.with-rest-assured] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-spring-restdocs.with-web-test-client[#features.testing.spring-boot-applications.autoconfigured-spring-restdocs.with-web-test-client] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-tests[#features.testing.spring-boot-applications.autoconfigured-tests] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-webservices[#features.testing.spring-boot-applications.autoconfigured-webservices] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-webservices.client[#features.testing.spring-boot-applications.autoconfigured-webservices.client] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-webservices.server[#features.testing.spring-boot-applications.autoconfigured-webservices.server] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.customizing-web-test-client[#features.testing.spring-boot-applications.customizing-web-test-client] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.detecting-configuration[#features.testing.spring-boot-applications.detecting-configuration] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.detecting-web-app-type[#features.testing.spring-boot-applications.detecting-web-app-type] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.excluding-configuration[#features.testing.spring-boot-applications.excluding-configuration] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.jmx[#features.testing.spring-boot-applications.jmx] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.json-tests[#features.testing.spring-boot-applications.json-tests] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.metrics[#features.testing.spring-boot-applications.metrics] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.mocking-beans[#features.testing.spring-boot-applications.mocking-beans] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.observations[#features.testing.spring-boot-applications.observations] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.spock[#features.testing.spring-boot-applications.spock] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.spring-graphql-tests[#features.testing.spring-boot-applications.spring-graphql-tests] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.spring-mvc-tests[#features.testing.spring-boot-applications.spring-mvc-tests] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.spring-webflux-tests[#features.testing.spring-boot-applications.spring-webflux-tests] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.tracing[#features.testing.spring-boot-applications.tracing] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.user-configuration-and-slicing[#features.testing.spring-boot-applications.user-configuration-and-slicing] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.using-application-arguments[#features.testing.spring-boot-applications.using-application-arguments] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.using-main[#features.testing.spring-boot-applications.using-main] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.with-mock-environment[#features.testing.spring-boot-applications.with-mock-environment] +* xref:reference:testing/spring-boot-applications.adoc#testing.spring-boot-applications.with-running-server[#features.testing.spring-boot-applications.with-running-server] +* xref:reference:testing/test-scope-dependencies.adoc#testing.test-scope-dependencies[#features.testing.test-scope-dependencies] +* xref:reference:testing/testcontainers.adoc#testing.testcontainers[#features.testing.testcontainers] +* xref:reference:testing/testcontainers.adoc#testing.testcontainers[#howto-testcontainers] +* xref:reference:testing/testcontainers.adoc#testing.testcontainers.dynamic-properties[#features.testing.testcontainers.dynamic-properties] +* xref:reference:testing/testcontainers.adoc#testing.testcontainers.service-connections[#features.testing.testcontainers.service-connections] +* xref:reference:testing/test-utilities.adoc#testing.utilities[#features.testing.utilities] +* xref:reference:testing/test-utilities.adoc#testing.utilities.config-data-application-context-initializer[#features.testing.utilities.config-data-application-context-initializer] +* xref:reference:testing/test-utilities.adoc#testing.utilities.output-capture[#features.testing.utilities.output-capture] +* xref:reference:testing/test-utilities.adoc#testing.utilities.test-property-values[#features.testing.utilities.test-property-values] +* xref:reference:testing/test-utilities.adoc#testing.utilities.test-rest-template[#features.testing.utilities.test-rest-template] * xref:reference:io/caching.adoc#io.caching[#boot-features-caching] * xref:reference:io/caching.adoc#io.caching[#io.caching] * xref:reference:io/caching.adoc#io.caching.provider[#io.caching.provider] diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/tracing.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/tracing.adoc index e7ffa8387a..6b22e5bb06 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/tracing.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/tracing.adoc @@ -218,4 +218,4 @@ For the example above, setting this property to `baggage1` results in an MDC ent == Tests Tracing components which are reporting data are not auto-configured when using `@SpringBootTest`. -See xref:features/testing.adoc#features.testing.spring-boot-applications.tracing[the testing section] for more details. +See xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.tracing[the testing section] for more details. diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/dev-services.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/dev-services.adoc index a27ecb888a..9dce4bc955 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/dev-services.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/dev-services.adoc @@ -286,7 +286,7 @@ spring: [[features.dev-services.testcontainers]] == Testcontainers Support -As well as xref:features/testing.adoc#features.testing.testcontainers[using Testcontainers for integration testing], it's also possible to use them at development time. +As well as xref:testing/testcontainers.adoc#testing.testcontainers[using Testcontainers for integration testing], it's also possible to use them at development time. The next sections will provide more details about that. @@ -312,7 +312,7 @@ To do this, you need to make sure that the `spring-boot-testcontainers` module h Once that has been done, you can create a `@TestConfiguration` class that declares `@Bean` methods for the containers you want to start. You can also annotate your `@Bean` methods with `@ServiceConnection` in order to create `ConnectionDetails` beans. -See xref:features/testing.adoc#features.testing.testcontainers.service-connections[the service connections] section for details of the supported technologies. +See xref:testing/testcontainers.adoc#testing.testcontainers.service-connections[the service connections] section for details of the supported technologies. A typical Testcontainers configuration would look like this: @@ -338,7 +338,7 @@ TIP: You can use the Maven goal `spring-boot:test-run` or the Gradle task `bootT ==== Contributing Dynamic Properties at Development Time If you want to contribute dynamic properties at development time from your `Container` `@Bean` methods, you can do so by injecting a `DynamicPropertyRegistry`. -This works in a similar way to the xref:features/testing.adoc#features.testing.testcontainers.dynamic-properties[`@DynamicPropertySource` annotation] that you can use in your tests. +This works in a similar way to the xref:testing/testcontainers.adoc#testing.testcontainers.dynamic-properties[`@DynamicPropertySource` annotation] that you can use in your tests. It allows you to add properties that will become available once your container has started. A typical configuration would look like this: @@ -365,7 +365,7 @@ To do so, add the `@ImportTestcontainers` annotation to your test configuration include-code::MyContainersConfiguration[] -TIP: If you don't intend to use the xref:features/testing.adoc#features.testing.testcontainers.service-connections[service connections feature] but want to use xref:features/testing.adoc#features.testing.testcontainers.dynamic-properties[`@DynamicPropertySource`] instead, remove the `@ServiceConnection` annotation from the `Container` fields. +TIP: If you don't intend to use the xref:testing/testcontainers.adoc#testing.testcontainers.service-connections[service connections feature] but want to use xref:testing/testcontainers.adoc#testing.testcontainers.dynamic-properties[`@DynamicPropertySource`] instead, remove the `@ServiceConnection` annotation from the `Container` fields. You can also add `@DynamicPropertySource` annotated methods to your declaration class. diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/external-config.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/external-config.adoc index 856e71972d..85b36182bf 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/external-config.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/external-config.adoc @@ -24,7 +24,7 @@ Sources are considered in the following order: . Properties from `SPRING_APPLICATION_JSON` (inline JSON embedded in an environment variable or system property). . Command line arguments. . `properties` attribute on your tests. - Available on xref:api:java/org/springframework/boot/test/context/SpringBootTest.html[`@SpringBootTest`] and the xref:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-tests[test annotations for testing a particular slice of your application]. + Available on xref:api:java/org/springframework/boot/test/context/SpringBootTest.html[`@SpringBootTest`] and the xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-tests[test annotations for testing a particular slice of your application]. . {url-spring-framework-javadoc}/org/springframework/test/context/DynamicPropertySource.html[`@DynamicPropertySource`] annotations in your tests. . {url-spring-framework-javadoc}/org/springframework/test/context/TestPropertySource.html[`@TestPropertySource`] annotations on your tests. . xref:using/devtools.adoc#using.devtools.globalsettings[Devtools global settings properties] in the `$HOME/.config/spring-boot` directory when devtools is active. diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/kotlin.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/kotlin.adoc index 38b3d3edf4..1ae07449a9 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/kotlin.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/kotlin.adoc @@ -145,7 +145,7 @@ JUnit 5 enables a test class to be instantiated once and reused for all of the c This makes it possible to use `@BeforeAll` and `@AfterAll` annotations on non-static methods, which is a good fit for Kotlin. To mock Kotlin classes, https://mockk.io/[MockK] is recommended. -If you need the `MockK` equivalent of the Mockito specific xref:features/testing.adoc#features.testing.spring-boot-applications.mocking-beans[`@MockBean` and `@SpyBean` annotations], you can use https://github.com/Ninja-Squad/springmockk[SpringMockK] which provides similar `@MockkBean` and `@SpykBean` annotations. +If you need the `MockK` equivalent of the Mockito specific xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.mocking-beans[`@MockBean` and `@SpyBean` annotations], you can use https://github.com/Ninja-Squad/springmockk[SpringMockK] which provides similar `@MockkBean` and `@SpykBean` annotations. diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/native-image/testing-native-applications.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/native-image/testing-native-applications.adoc index b9571d2897..8d24b9f750 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/native-image/testing-native-applications.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/native-image/testing-native-applications.adoc @@ -58,7 +58,7 @@ For example, you might choose to run native tests once a day. Spring Framework includes ahead-of-time support for running tests. All the usual Spring testing features work with native image tests. For example, you can continue to use the `@SpringBootTest` annotation. -You can also use Spring Boot xref:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-tests[test slices] to test only specific parts of your application. +You can also use Spring Boot xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-tests[test slices] to test only specific parts of your application. Spring Framework's native testing support works in the following way: diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/index.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/index.adoc new file mode 100644 index 0000000000..7cbbd53df5 --- /dev/null +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/index.adoc @@ -0,0 +1,30 @@ +[[testing]] += Testing + +Spring Boot provides a number of utilities and annotations to help when testing your application. +Test support is provided by two modules: `spring-boot-test` contains core items, and `spring-boot-test-autoconfigure` supports auto-configuration for tests. + +Most developers use the `spring-boot-starter-test` "`Starter`", which imports both Spring Boot test modules as well as JUnit Jupiter, AssertJ, Hamcrest, and a number of other useful libraries. + +[TIP] +==== +If you have tests that use JUnit 4, JUnit 5's vintage engine can be used to run them. +To use the vintage engine, add a dependency on `junit-vintage-engine`, as shown in the following example: + +[source,xml] +---- + + org.junit.vintage + junit-vintage-engine + test + + + org.hamcrest + hamcrest-core + + + +---- +==== + +`hamcrest-core` is excluded in favor of `org.hamcrest:hamcrest` that is part of `spring-boot-starter-test`. diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/spring-applications.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/spring-applications.adoc new file mode 100644 index 0000000000..dacc9384e7 --- /dev/null +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/spring-applications.adoc @@ -0,0 +1,14 @@ +[[testing.spring-applications]] += Testing Spring Applications + +One of the major advantages of dependency injection is that it should make your code easier to unit test. +You can instantiate objects by using the `new` operator without even involving Spring. +You can also use _mock objects_ instead of real dependencies. + +Often, you need to move beyond unit testing and start integration testing (with a Spring `ApplicationContext`). +It is useful to be able to perform integration testing without requiring deployment of your application or needing to connect to other infrastructure. + +The Spring Framework includes a dedicated test module for such integration testing. +You can declare a dependency directly to `org.springframework:spring-test` or use the `spring-boot-starter-test` "`Starter`" to pull it in transitively. + +If you have not used the `spring-test` module before, you should start by reading the {url-spring-framework-docs}/testing.html[relevant section] of the Spring Framework reference documentation. diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/testing.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/spring-boot-applications.adoc similarity index 69% rename from spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/testing.adoc rename to spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/spring-boot-applications.adoc index cbfdaaba79..f9b7d1e542 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/testing.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/spring-boot-applications.adoc @@ -1,82 +1,13 @@ -[[features.testing]] -= Testing - -Spring Boot provides a number of utilities and annotations to help when testing your application. -Test support is provided by two modules: `spring-boot-test` contains core items, and `spring-boot-test-autoconfigure` supports auto-configuration for tests. - -Most developers use the `spring-boot-starter-test` "`Starter`", which imports both Spring Boot test modules as well as JUnit Jupiter, AssertJ, Hamcrest, and a number of other useful libraries. - -[TIP] -==== -If you have tests that use JUnit 4, JUnit 5's vintage engine can be used to run them. -To use the vintage engine, add a dependency on `junit-vintage-engine`, as shown in the following example: - -[source,xml] ----- - - org.junit.vintage - junit-vintage-engine - test - - - org.hamcrest - hamcrest-core - - - ----- -==== - -`hamcrest-core` is excluded in favor of `org.hamcrest:hamcrest` that is part of `spring-boot-starter-test`. - - - -[[features.testing.test-scope-dependencies]] -== Test Scope Dependencies - -The `spring-boot-starter-test` "`Starter`" (in the `test` `scope`) contains the following provided libraries: - -* https://junit.org/junit5/[JUnit 5]: The de-facto standard for unit testing Java applications. -* {url-spring-framework-docs}/testing/integration.html[Spring Test] & Spring Boot Test: Utilities and integration test support for Spring Boot applications. -* https://assertj.github.io/doc/[AssertJ]: A fluent assertion library. -* https://github.com/hamcrest/JavaHamcrest[Hamcrest]: A library of matcher objects (also known as constraints or predicates). -* https://site.mockito.org/[Mockito]: A Java mocking framework. -* https://github.com/skyscreamer/JSONassert[JSONassert]: An assertion library for JSON. -* https://github.com/jayway/JsonPath[JsonPath]: XPath for JSON. -* https://github.com/awaitility/awaitility[Awaitility]: A library for testing asynchronous systems. - -We generally find these common libraries to be useful when writing tests. -If these libraries do not suit your needs, you can add additional test dependencies of your own. - - - -[[features.testing.spring-applications]] -== Testing Spring Applications - -One of the major advantages of dependency injection is that it should make your code easier to unit test. -You can instantiate objects by using the `new` operator without even involving Spring. -You can also use _mock objects_ instead of real dependencies. - -Often, you need to move beyond unit testing and start integration testing (with a Spring `ApplicationContext`). -It is useful to be able to perform integration testing without requiring deployment of your application or needing to connect to other infrastructure. - -The Spring Framework includes a dedicated test module for such integration testing. -You can declare a dependency directly to `org.springframework:spring-test` or use the `spring-boot-starter-test` "`Starter`" to pull it in transitively. - -If you have not used the `spring-test` module before, you should start by reading the {url-spring-framework-docs}/testing.html[relevant section] of the Spring Framework reference documentation. - - - -[[features.testing.spring-boot-applications]] -== Testing Spring Boot Applications +[[testing.spring-boot-applications]] += Testing Spring Boot Applications A Spring Boot application is a Spring `ApplicationContext`, so nothing very special has to be done to test it beyond what you would normally do with a vanilla Spring context. NOTE: External properties, logging, and other features of Spring Boot are installed in the context by default only if you use `SpringApplication` to create it. Spring Boot provides a `@SpringBootTest` annotation, which can be used as an alternative to the standard `spring-test` `@ContextConfiguration` annotation when you need Spring Boot features. -The annotation works by xref:features/testing.adoc#features.testing.spring-boot-applications.detecting-configuration[creating the `ApplicationContext` used in your tests through `SpringApplication`]. -In addition to `@SpringBootTest` a number of other annotations are also provided for xref:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-tests[testing more specific slices] of an application. +The annotation works by xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.detecting-configuration[creating the `ApplicationContext` used in your tests through `SpringApplication`]. +In addition to `@SpringBootTest` a number of other annotations are also provided for xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-tests[testing more specific slices] of an application. TIP: If you are using JUnit 4, do not forget to also add `@RunWith(SpringRunner.class)` to your test, otherwise the annotations will be ignored. If you are using JUnit 5, there is no need to add the equivalent `@ExtendWith(SpringExtension.class)` as `@SpringBootTest` and the other `@...Test` annotations are already annotated with it. @@ -85,13 +16,13 @@ By default, `@SpringBootTest` will not start a server. You can use the `webEnvironment` attribute of `@SpringBootTest` to further refine how your tests run: * `MOCK`(Default) : Loads a web `ApplicationContext` and provides a mock web environment. - Embedded servers are not started when using this annotation. - If a web environment is not available on your classpath, this mode transparently falls back to creating a regular non-web `ApplicationContext`. - It can be used in conjunction with xref:features/testing.adoc#features.testing.spring-boot-applications.with-mock-environment[`@AutoConfigureMockMvc` or `@AutoConfigureWebTestClient`] for mock-based testing of your web application. +Embedded servers are not started when using this annotation. +If a web environment is not available on your classpath, this mode transparently falls back to creating a regular non-web `ApplicationContext`. +It can be used in conjunction with xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.with-mock-environment[`@AutoConfigureMockMvc` or `@AutoConfigureWebTestClient`] for mock-based testing of your web application. * `RANDOM_PORT`: Loads a `WebServerApplicationContext` and provides a real web environment. - Embedded servers are started and listen on a random port. +Embedded servers are started and listen on a random port. * `DEFINED_PORT`: Loads a `WebServerApplicationContext` and provides a real web environment. - Embedded servers are started and listen on a defined port (from your `application.properties`) or on the default port of `8080`. +Embedded servers are started and listen on a defined port (from your `application.properties`) or on the default port of `8080`. * `NONE`: Loads an `ApplicationContext` by using `SpringApplication` but does not provide _any_ web environment (mock or otherwise). NOTE: If your test is `@Transactional`, it rolls back the transaction at the end of each test method by default. @@ -102,8 +33,8 @@ NOTE: `@SpringBootTest` with `webEnvironment = WebEnvironment.RANDOM_PORT` will -[[features.testing.spring-boot-applications.detecting-web-app-type]] -=== Detecting Web Application Type +[[testing.spring-boot-applications.detecting-web-app-type]] +== Detecting Web Application Type If Spring MVC is available, a regular MVC-based application context is configured. If you have only Spring WebFlux, we will detect that and configure a WebFlux-based application context instead. @@ -115,8 +46,8 @@ include-code::MyWebFluxTests[] -[[features.testing.spring-boot-applications.detecting-configuration]] -=== Detecting Test Configuration +[[testing.spring-boot-applications.detecting-configuration]] +== Detecting Test Configuration If you are familiar with the Spring Test Framework, you may be used to using `@ContextConfiguration(classes=...)` in order to specify which Spring `@Configuration` to load. Alternatively, you might have often used nested `@Configuration` classes within your test. @@ -129,7 +60,7 @@ As long as you xref:using/structuring-your-code.adoc[structured your code] in a [NOTE] ==== -If you use a xref:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-tests[test annotation to test a more specific slice of your application], you should avoid adding configuration settings that are specific to a particular area on the xref:features/testing.adoc#features.testing.spring-boot-applications.user-configuration-and-slicing[main method's application class]. +If you use a xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-tests[test annotation to test a more specific slice of your application], you should avoid adding configuration settings that are specific to a particular area on the xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.user-configuration-and-slicing[main method's application class]. The underlying component scan configuration of `@SpringBootApplication` defines exclude filters that are used to make sure slicing works as expected. If you are using an explicit `@ComponentScan` directive on your `@SpringBootApplication`-annotated class, be aware that those filters will be disabled. @@ -144,8 +75,8 @@ Therefore, as long as your tests share the same configuration (no matter how it -[[features.testing.spring-boot-applications.using-main]] -=== Using the Test Configuration Main Method +[[testing.spring-boot-applications.using-main]] +== Using the Test Configuration Main Method Typically the test configuration discovered by `@SpringBootTest` will be your main `@SpringBootApplication`. In most well structured applications, this configuration class will also include the `main` method used to launch the application. @@ -175,12 +106,12 @@ include-code::always/MyApplicationTests[] -[[features.testing.spring-boot-applications.excluding-configuration]] -=== Excluding Test Configuration +[[testing.spring-boot-applications.excluding-configuration]] +== Excluding Test Configuration If your application uses component scanning (for example, if you use `@SpringBootApplication` or `@ComponentScan`), you may find top-level configuration classes that you created only for specific tests accidentally get picked up everywhere. -As we xref:features/testing.adoc#features.testing.spring-boot-applications.detecting-configuration[have seen earlier], `@TestConfiguration` can be used on an inner class of a test to customize the primary configuration. +As we xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.detecting-configuration[have seen earlier], `@TestConfiguration` can be used on an inner class of a test to customize the primary configuration. `@TestConfiguration` can also be used on a top-level class. Doing so indicates that the class should not be picked up by scanning. You can then import the class explicitly where it is required, as shown in the following example: @@ -194,8 +125,8 @@ Generally speaking, this difference in ordering has no noticeable effect but it -[[features.testing.spring-boot-applications.using-application-arguments]] -=== Using Application Arguments +[[testing.spring-boot-applications.using-application-arguments]] +== Using Application Arguments If your application expects xref:features/spring-application.adoc#features.spring-application.application-arguments[arguments], you can have `@SpringBootTest` inject them using the `args` attribute. @@ -204,8 +135,8 @@ include-code::MyApplicationArgumentTests[] -[[features.testing.spring-boot-applications.with-mock-environment]] -=== Testing With a Mock Environment +[[testing.spring-boot-applications.with-mock-environment]] +== Testing With a Mock Environment By default, `@SpringBootTest` does not start the server but instead sets up a mock environment for testing web endpoints. @@ -213,7 +144,7 @@ With Spring MVC, we can query our web endpoints using {url-spring-framework-docs include-code::MyMockMvcTests[] -TIP: If you want to focus only on the web layer and not start a complete `ApplicationContext`, consider xref:features/testing.adoc#features.testing.spring-boot-applications.spring-mvc-tests[using `@WebMvcTest` instead]. +TIP: If you want to focus only on the web layer and not start a complete `ApplicationContext`, consider xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.spring-mvc-tests[using `@WebMvcTest` instead]. With Spring WebFlux endpoints, you can use {url-spring-framework-docs}/testing/webtestclient.html[`WebTestClient`] as shown in the following example: @@ -231,8 +162,8 @@ If you need to test these lower-level concerns, you can start a fully running se -[[features.testing.spring-boot-applications.with-running-server]] -=== Testing With a Running Server +[[testing.spring-boot-applications.with-running-server]] +== Testing With a Running Server If you need to start a full running server, we recommend that you use random ports. If you use `@SpringBootTest(webEnvironment=WebEnvironment.RANDOM_PORT)`, an available port is picked at random each time your test runs. @@ -242,7 +173,7 @@ For convenience, tests that need to make REST calls to the started server can ad include-code::MyRandomPortWebTestClientTests[] -TIP: `WebTestClient` can also used with a xref:features/testing.adoc#features.testing.spring-boot-applications.with-mock-environment[mock environment], removing the need for a running server, by annotating your test class with `@AutoConfigureWebTestClient`. +TIP: `WebTestClient` can also used with a xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.with-mock-environment[mock environment], removing the need for a running server, by annotating your test class with `@AutoConfigureWebTestClient`. This setup requires `spring-webflux` on the classpath. If you can not or will not add webflux, Spring Boot also provides a `TestRestTemplate` facility: @@ -251,16 +182,16 @@ include-code::MyRandomPortTestRestTemplateTests[] -[[features.testing.spring-boot-applications.customizing-web-test-client]] -=== Customizing WebTestClient +[[testing.spring-boot-applications.customizing-web-test-client]] +== Customizing WebTestClient To customize the `WebTestClient` bean, configure a `WebTestClientBuilderCustomizer` bean. Any such beans are called with the `WebTestClient.Builder` that is used to create the `WebTestClient`. -[[features.testing.spring-boot-applications.jmx]] -=== Using JMX +[[testing.spring-boot-applications.jmx]] +== Using JMX As the test context framework caches context, JMX is disabled by default to prevent identical components to register on the same domain. If such test needs access to an `MBeanServer`, consider marking it dirty as well: @@ -269,27 +200,27 @@ include-code::MyJmxTests[] -[[features.testing.spring-boot-applications.observations]] -=== Using Observations +[[testing.spring-boot-applications.observations]] +== Using Observations -If you annotate xref:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-tests[a sliced test] with `@AutoConfigureObservability`, it auto-configures an `ObservationRegistry`. +If you annotate xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-tests[a sliced test] with `@AutoConfigureObservability`, it auto-configures an `ObservationRegistry`. -[[features.testing.spring-boot-applications.metrics]] -=== Using Metrics +[[testing.spring-boot-applications.metrics]] +== Using Metrics Regardless of your classpath, meter registries, except the in-memory backed, are not auto-configured when using `@SpringBootTest`. If you need to export metrics to a different backend as part of an integration test, annotate it with `@AutoConfigureObservability`. -If you annotate xref:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-tests[a sliced test] with `@AutoConfigureObservability`, it auto-configures an in-memory `MeterRegistry`. +If you annotate xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-tests[a sliced test] with `@AutoConfigureObservability`, it auto-configures an in-memory `MeterRegistry`. Data exporting in sliced tests is not supported with the `@AutoConfigureObservability` annotation. -[[features.testing.spring-boot-applications.tracing]] -=== Using Tracing +[[testing.spring-boot-applications.tracing]] +== Using Tracing Regardless of your classpath, tracing components which are reporting data are not auto-configured when using `@SpringBootTest`. @@ -297,13 +228,13 @@ If you need those components as part of an integration test, annotate the test w If you have created your own reporting components (e.g. a custom `SpanExporter` or `SpanHandler`) and you don't want them to be active in tests, you can use the `@ConditionalOnEnabledTracing` annotation to disable them. -If you annotate xref:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-tests[a sliced test] with `@AutoConfigureObservability`, it auto-configures a no-op `Tracer`. +If you annotate xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-tests[a sliced test] with `@AutoConfigureObservability`, it auto-configures a no-op `Tracer`. Data exporting in sliced tests is not supported with the `@AutoConfigureObservability` annotation. -[[features.testing.spring-boot-applications.mocking-beans]] -=== Mocking and Spying Beans +[[testing.spring-boot-applications.mocking-beans]] +== Mocking and Spying Beans When running tests, it is sometimes necessary to mock certain components within your application context. For example, you may have a facade over some remote service that is unavailable during development. @@ -344,8 +275,8 @@ Use `AopTestUtils.getTargetObject(yourProxiedSpy)` to do so. -[[features.testing.spring-boot-applications.autoconfigured-tests]] -=== Auto-configured Tests +[[testing.spring-boot-applications.autoconfigured-tests]] +== Auto-configured Tests Spring Boot's auto-configuration system works well for applications but can sometimes be a little too much for tests. It often helps to load only the parts of the configuration that are required to test a "`slice`" of your application. @@ -366,8 +297,8 @@ You can use this combination if you are not interested in "`slicing`" your appli -[[features.testing.spring-boot-applications.json-tests]] -=== Auto-configured JSON Tests +[[testing.spring-boot-applications.json-tests]] +== Auto-configured JSON Tests To test that object JSON serialization and deserialization is working as expected, you can use the `@JsonTest` annotation. `@JsonTest` auto-configures the available supported JSON mapper, which can be one of the following libraries: @@ -398,8 +329,8 @@ include-code::MyJsonAssertJTests[tag=*] -[[features.testing.spring-boot-applications.spring-mvc-tests]] -=== Auto-configured Spring MVC Tests +[[testing.spring-boot-applications.spring-mvc-tests]] +== Auto-configured Spring MVC Tests To test whether Spring MVC controllers are working as expected, use the `@WebMvcTest` annotation. `@WebMvcTest` auto-configures the Spring MVC infrastructure and limits scanned beans to `@Controller`, `@ControllerAdvice`, `@JsonComponent`, `Converter`, `GenericConverter`, `Filter`, `HandlerInterceptor`, `WebMvcConfigurer`, `WebMvcRegistrations`, and `HandlerMethodArgumentResolver`. @@ -437,12 +368,12 @@ If you have Spring Security on the classpath, `@WebMvcTest` will also scan `WebS Instead of disabling security completely for such tests, you can use Spring Security's test support. More details on how to use Spring Security's `MockMvc` support can be found in this _xref:how-to:testing.adoc#howto.testing.with-spring-security[Testing With Spring Security]_ how-to section. -TIP: Sometimes writing Spring MVC tests is not enough; Spring Boot can help you run xref:features/testing.adoc#features.testing.spring-boot-applications.with-running-server[full end-to-end tests with an actual server]. +TIP: Sometimes writing Spring MVC tests is not enough; Spring Boot can help you run xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.with-running-server[full end-to-end tests with an actual server]. -[[features.testing.spring-boot-applications.spring-webflux-tests]] -=== Auto-configured Spring WebFlux Tests +[[testing.spring-boot-applications.spring-webflux-tests]] +== Auto-configured Spring WebFlux Tests To test that {url-spring-framework-docs}/web-reactive.html[Spring WebFlux] controllers are working as expected, you can use the `@WebFluxTest` annotation. `@WebFluxTest` auto-configures the Spring WebFlux infrastructure and limits scanned beans to `@Controller`, `@ControllerAdvice`, `@JsonComponent`, `Converter`, `GenericConverter`, `WebFilter`, and `WebFluxConfigurer`. @@ -470,12 +401,12 @@ For testing `RouterFunction` beans in the context, consider importing your `Rout NOTE: `@WebFluxTest` cannot detect custom security configuration registered as a `@Bean` of type `SecurityWebFilterChain`. To include that in your test, you will need to import the configuration that registers the bean by using `@Import` or by using `@SpringBootTest`. -TIP: Sometimes writing Spring WebFlux tests is not enough; Spring Boot can help you run xref:features/testing.adoc#features.testing.spring-boot-applications.with-running-server[full end-to-end tests with an actual server]. +TIP: Sometimes writing Spring WebFlux tests is not enough; Spring Boot can help you run xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.with-running-server[full end-to-end tests with an actual server]. -[[features.testing.spring-boot-applications.spring-graphql-tests]] -=== Auto-configured Spring GraphQL Tests +[[testing.spring-boot-applications.spring-graphql-tests]] +== Auto-configured Spring GraphQL Tests Spring GraphQL offers a dedicated testing support module; you'll need to add it to your project: @@ -534,8 +465,8 @@ include-code::GraphQlIntegrationTests[] -[[features.testing.spring-boot-applications.autoconfigured-spring-data-cassandra]] -=== Auto-configured Data Cassandra Tests +[[testing.spring-boot-applications.autoconfigured-spring-data-cassandra]] +== Auto-configured Data Cassandra Tests You can use `@DataCassandraTest` to test Cassandra applications. By default, it configures a `CassandraTemplate`, scans for `@Table` classes, and configures Spring Data Cassandra repositories. @@ -551,8 +482,8 @@ include-code::MyDataCassandraTests[] -[[features.testing.spring-boot-applications.autoconfigured-spring-data-couchbase]] -=== Auto-configured Data Couchbase Tests +[[testing.spring-boot-applications.autoconfigured-spring-data-couchbase]] +== Auto-configured Data Couchbase Tests You can use `@DataCouchbaseTest` to test Couchbase applications. By default, it configures a `CouchbaseTemplate` or `ReactiveCouchbaseTemplate`, scans for `@Document` classes, and configures Spring Data Couchbase repositories. @@ -568,8 +499,8 @@ include-code::MyDataCouchbaseTests[] -[[features.testing.spring-boot-applications.autoconfigured-spring-data-elasticsearch]] -=== Auto-configured Data Elasticsearch Tests +[[testing.spring-boot-applications.autoconfigured-spring-data-elasticsearch]] +== Auto-configured Data Elasticsearch Tests You can use `@DataElasticsearchTest` to test Elasticsearch applications. By default, it configures an `ElasticsearchRestTemplate`, scans for `@Document` classes, and configures Spring Data Elasticsearch repositories. @@ -585,8 +516,8 @@ include-code::MyDataElasticsearchTests[] -[[features.testing.spring-boot-applications.autoconfigured-spring-data-jpa]] -=== Auto-configured Data JPA Tests +[[testing.spring-boot-applications.autoconfigured-spring-data-jpa]] +== Auto-configured Data JPA Tests You can use the `@DataJpaTest` annotation to test JPA applications. By default, it scans for `@Entity` classes and configures Spring Data JPA repositories. @@ -622,8 +553,8 @@ include-code::withdb/MyRepositoryTests[] -[[features.testing.spring-boot-applications.autoconfigured-jdbc]] -=== Auto-configured JDBC Tests +[[testing.spring-boot-applications.autoconfigured-jdbc]] +== Auto-configured JDBC Tests `@JdbcTest` is similar to `@DataJpaTest` but is for tests that only require a `DataSource` and do not use Spring Data JDBC. By default, it configures an in-memory embedded database and a `JdbcTemplate`. @@ -639,12 +570,12 @@ If that is not what you want, you can disable transaction management for a test include-code::MyTransactionalTests[] If you prefer your test to run against a real database, you can use the `@AutoConfigureTestDatabase` annotation in the same way as for `@DataJpaTest`. -(See "xref:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-spring-data-jpa[Auto-configured Data JPA Tests]".) +(See "xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-spring-data-jpa[Auto-configured Data JPA Tests]".) -[[features.testing.spring-boot-applications.autoconfigured-spring-data-jdbc]] -=== Auto-configured Data JDBC Tests +[[testing.spring-boot-applications.autoconfigured-spring-data-jdbc]] +== Auto-configured Data JDBC Tests `@DataJdbcTest` is similar to `@JdbcTest` but is for tests that use Spring Data JDBC repositories. By default, it configures an in-memory embedded database, a `JdbcTemplate`, and Spring Data JDBC repositories. @@ -655,15 +586,15 @@ TIP: A list of the auto-configurations that are enabled by `@DataJdbcTest` can b By default, Data JDBC tests are transactional and roll back at the end of each test. See the {url-spring-framework-docs}/testing/testcontext-framework/tx.html#testcontext-tx-enabling-transactions[relevant section] in the Spring Framework Reference Documentation for more details. -If that is not what you want, you can disable transaction management for a test or for the whole test class as xref:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-jdbc[shown in the JDBC example]. +If that is not what you want, you can disable transaction management for a test or for the whole test class as xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-jdbc[shown in the JDBC example]. If you prefer your test to run against a real database, you can use the `@AutoConfigureTestDatabase` annotation in the same way as for `@DataJpaTest`. -(See "xref:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-spring-data-jpa[Auto-configured Data JPA Tests]".) +(See "xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-spring-data-jpa[Auto-configured Data JPA Tests]".) -[[features.testing.spring-boot-applications.autoconfigured-spring-data-r2dbc]] -=== Auto-configured Data R2DBC Tests +[[testing.spring-boot-applications.autoconfigured-spring-data-r2dbc]] +== Auto-configured Data R2DBC Tests `@DataR2dbcTest` is similar to `@DataJdbcTest` but is for tests that use Spring Data R2DBC repositories. By default, it configures an in-memory embedded database, an `R2dbcEntityTemplate`, and Spring Data R2DBC repositories. @@ -675,12 +606,12 @@ TIP: A list of the auto-configurations that are enabled by `@DataR2dbcTest` can By default, Data R2DBC tests are not transactional. If you prefer your test to run against a real database, you can use the `@AutoConfigureTestDatabase` annotation in the same way as for `@DataJpaTest`. -(See "xref:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-spring-data-jpa[Auto-configured Data JPA Tests]".) +(See "xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-spring-data-jpa[Auto-configured Data JPA Tests]".) -[[features.testing.spring-boot-applications.autoconfigured-jooq]] -=== Auto-configured jOOQ Tests +[[testing.spring-boot-applications.autoconfigured-jooq]] +== Auto-configured jOOQ Tests You can use `@JooqTest` in a similar fashion as `@JdbcTest` but for jOOQ-related tests. As jOOQ relies heavily on a Java-based schema that corresponds with the database schema, the existing `DataSource` is used. @@ -697,12 +628,12 @@ The following example shows the `@JooqTest` annotation in use: include-code::MyJooqTests[] JOOQ tests are transactional and roll back at the end of each test by default. -If that is not what you want, you can disable transaction management for a test or for the whole test class as xref:features/testing.adoc#features.testing.spring-boot-applications.autoconfigured-jdbc[shown in the JDBC example]. +If that is not what you want, you can disable transaction management for a test or for the whole test class as xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-jdbc[shown in the JDBC example]. -[[features.testing.spring-boot-applications.autoconfigured-spring-data-mongodb]] -=== Auto-configured Data MongoDB Tests +[[testing.spring-boot-applications.autoconfigured-spring-data-mongodb]] +== Auto-configured Data MongoDB Tests You can use `@DataMongoTest` to test MongoDB applications. By default, it configures a `MongoTemplate`, scans for `@Document` classes, and configures Spring Data MongoDB repositories. @@ -718,8 +649,8 @@ include-code::MyDataMongoDbTests[] -[[features.testing.spring-boot-applications.autoconfigured-spring-data-neo4j]] -=== Auto-configured Data Neo4j Tests +[[testing.spring-boot-applications.autoconfigured-spring-data-neo4j]] +== Auto-configured Data Neo4j Tests You can use `@DataNeo4jTest` to test Neo4j applications. By default, it scans for `@Node` classes, and configures Spring Data Neo4j repositories. @@ -744,8 +675,8 @@ If you are using this style, you must configure `@DataNeo4jTest` tests as descri -[[features.testing.spring-boot-applications.autoconfigured-spring-data-redis]] -=== Auto-configured Data Redis Tests +[[testing.spring-boot-applications.autoconfigured-spring-data-redis]] +== Auto-configured Data Redis Tests You can use `@DataRedisTest` to test Redis applications. By default, it scans for `@RedisHash` classes and configures Spring Data Redis repositories. @@ -761,8 +692,8 @@ include-code::MyDataRedisTests[] -[[features.testing.spring-boot-applications.autoconfigured-spring-data-ldap]] -=== Auto-configured Data LDAP Tests +[[testing.spring-boot-applications.autoconfigured-spring-data-ldap]] +== Auto-configured Data LDAP Tests You can use `@DataLdapTest` to test LDAP applications. By default, it configures an in-memory embedded LDAP (if available), configures an `LdapTemplate`, scans for `@Entry` classes, and configures Spring Data LDAP repositories. @@ -783,8 +714,8 @@ include-code::server/MyDataLdapTests[] -[[features.testing.spring-boot-applications.autoconfigured-rest-client]] -=== Auto-configured REST Clients +[[testing.spring-boot-applications.autoconfigured-rest-client]] +== Auto-configured REST Clients You can use the `@RestClientTest` annotation to test REST clients. By default, it auto-configures Jackson, GSON, and Jsonb support, configures a `RestTemplateBuilder` and a `RestClient.Builder`, and adds support for `MockRestServiceServer`. @@ -805,8 +736,8 @@ include-code::MyRestClientServiceTests[] -[[features.testing.spring-boot-applications.autoconfigured-spring-restdocs]] -=== Auto-configured Spring REST Docs Tests +[[testing.spring-boot-applications.autoconfigured-spring-restdocs]] +== Auto-configured Spring REST Docs Tests You can use the `@AutoConfigureRestDocs` annotation to use {url-spring-restdocs-site}[Spring REST Docs] in your tests with Mock MVC, REST Assured, or WebTestClient. It removes the need for the JUnit extension in Spring REST Docs. @@ -816,8 +747,8 @@ It can also be used to configure the host, scheme, and port that appears in any -[[features.testing.spring-boot-applications.autoconfigured-spring-restdocs.with-mock-mvc]] -==== Auto-configured Spring REST Docs Tests With Mock MVC +[[testing.spring-boot-applications.autoconfigured-spring-restdocs.with-mock-mvc]] +=== Auto-configured Spring REST Docs Tests With Mock MVC `@AutoConfigureRestDocs` customizes the `MockMvc` bean to use Spring REST Docs when testing servlet-based web applications. You can inject it by using `@Autowired` and use it in your tests as you normally would when using Mock MVC and Spring REST Docs, as shown in the following example: @@ -836,8 +767,8 @@ include-code::MyResultHandlerConfiguration[] -[[features.testing.spring-boot-applications.autoconfigured-spring-restdocs.with-web-test-client]] -==== Auto-configured Spring REST Docs Tests With WebTestClient +[[testing.spring-boot-applications.autoconfigured-spring-restdocs.with-web-test-client]] +=== Auto-configured Spring REST Docs Tests With WebTestClient `@AutoConfigureRestDocs` can also be used with `WebTestClient` when testing reactive web applications. You can inject it by using `@Autowired` and use it in your tests as you normally would when using `@WebFluxTest` and Spring REST Docs, as shown in the following example: @@ -855,8 +786,8 @@ include-code::MyWebTestClientBuilderCustomizerConfiguration[] -[[features.testing.spring-boot-applications.autoconfigured-spring-restdocs.with-rest-assured]] -==== Auto-configured Spring REST Docs Tests With REST Assured +[[testing.spring-boot-applications.autoconfigured-spring-restdocs.with-rest-assured]] +=== Auto-configured Spring REST Docs Tests With REST Assured `@AutoConfigureRestDocs` makes a `RequestSpecification` bean, preconfigured to use Spring REST Docs, available to your tests. You can inject it by using `@Autowired` and use it in your tests as you normally would when using REST Assured and Spring REST Docs, as shown in the following example: @@ -869,13 +800,13 @@ include-code::MyRestDocsConfiguration[] -[[features.testing.spring-boot-applications.autoconfigured-webservices]] -=== Auto-configured Spring Web Services Tests +[[testing.spring-boot-applications.autoconfigured-webservices]] +== Auto-configured Spring Web Services Tests -[[features.testing.spring-boot-applications.autoconfigured-webservices.client]] -==== Auto-configured Spring Web Services Client Tests +[[testing.spring-boot-applications.autoconfigured-webservices.client]] +=== Auto-configured Spring Web Services Client Tests You can use `@WebServiceClientTest` to test applications that call web services using the Spring Web Services project. By default, it configures a mock `WebServiceServer` bean and automatically customizes your `WebServiceTemplateBuilder`. @@ -890,8 +821,8 @@ include-code::MyWebServiceClientTests[] -[[features.testing.spring-boot-applications.autoconfigured-webservices.server]] -==== Auto-configured Spring Web Services Server Tests +[[testing.spring-boot-applications.autoconfigured-webservices.server]] +=== Auto-configured Spring Web Services Server Tests You can use `@WebServiceServerTest` to test applications that implement web services using the Spring Web Services project. By default, it configures a `MockWebServiceClient` bean that can be used to call your web service endpoints. @@ -906,8 +837,8 @@ include-code::MyWebServiceServerTests[] -[[features.testing.spring-boot-applications.additional-autoconfiguration-and-slicing]] -=== Additional Auto-configuration and Slicing +[[testing.spring-boot-applications.additional-autoconfiguration-and-slicing]] +== Additional Auto-configuration and Slicing Each slice provides one or more `@AutoConfigure...` annotations that namely defines the auto-configurations that should be included as part of a slice. Additional auto-configurations can be added on a test-by-test basis by creating a custom `@AutoConfigure...` annotation or by adding `@ImportAutoConfiguration` to the test as shown in the following example: @@ -932,10 +863,10 @@ TIP: A slice or `@AutoConfigure...` annotation can be customized this way as lon -[[features.testing.spring-boot-applications.user-configuration-and-slicing]] -=== User Configuration and Slicing +[[testing.spring-boot-applications.user-configuration-and-slicing]] +== User Configuration and Slicing -If you xref:using/structuring-your-code.adoc[structure your code] in a sensible way, your `@SpringBootApplication` class is xref:features/testing.adoc#features.testing.spring-boot-applications.detecting-configuration[used by default] as the configuration of your tests. +If you xref:using/structuring-your-code.adoc[structure your code] in a sensible way, your `@SpringBootApplication` class is xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.detecting-configuration[used by default] as the configuration of your tests. It then becomes important not to litter the application's main class with configuration settings that are specific to a particular area of its functionality. @@ -977,214 +908,10 @@ Alternatively, you can specify a source for your test, which disables the behavi -[[features.testing.spring-boot-applications.spock]] -=== Using Spock to Test Spring Boot Applications +[[testing.spring-boot-applications.spock]] +== Using Spock to Test Spring Boot Applications Spock 2.2 or later can be used to test a Spring Boot application. To do so, add a dependency on a `-groovy-4.0` version of Spock's `spock-spring` module to your application's build. `spock-spring` integrates Spring's test framework into Spock. See https://spockframework.org/spock/docs/2.2-M1/modules.html#_spring_module[the documentation for Spock's Spring module] for further details. - - - -[[features.testing.testcontainers]] -== Testcontainers - -The https://www.testcontainers.org/[Testcontainers] library provides a way to manage services running inside Docker containers. -It integrates with JUnit, allowing you to write a test class that can start up a container before any of the tests run. -Testcontainers is especially useful for writing integration tests that talk to a real backend service such as MySQL, MongoDB, Cassandra and others. - -Testcontainers can be used in a Spring Boot test as follows: - -include-code::vanilla/MyIntegrationTests[] - -This will start up a docker container running Neo4j (if Docker is running locally) before any of the tests are run. -In most cases, you will need to configure the application to connect to the service running in the container. - - - -[[features.testing.testcontainers.service-connections]] -=== Service Connections - -A service connection is a connection to any remote service. -Spring Boot's auto-configuration can consume the details of a service connection and use them to establish a connection to a remote service. -When doing so, the connection details take precedence over any connection-related configuration properties. - -When using Testcontainers, connection details can be automatically created for a service running in a container by annotating the container field in the test class. - -include-code::MyIntegrationTests[] - -Thanks to `@ServiceConnection`, the above configuration allows Neo4j-related beans in the application to communicate with Neo4j running inside the Testcontainers-managed Docker container. -This is done by automatically defining a `Neo4jConnectionDetails` bean which is then used by the Neo4j auto-configuration, overriding any connection-related configuration properties. - -NOTE: You'll need to add the `spring-boot-testcontainers` module as a test dependency in order to use service connections with Testcontainers. - -Service connection annotations are processed by `ContainerConnectionDetailsFactory` classes registered with `spring.factories`. -A `ContainerConnectionDetailsFactory` can create a `ConnectionDetails` bean based on a specific `Container` subclass, or the Docker image name. - -The following service connection factories are provided in the `spring-boot-testcontainers` jar: - -|=== -| Connection Details | Matched on - -| `ActiveMQConnectionDetails` -| Containers named "symptoma/activemq" or `ActiveMQContainer` - -| `ArtemisConnectionDetails` -| Containers of type `ArtemisContainer` - -| `CassandraConnectionDetails` -| Containers of type `CassandraContainer` - -| `CouchbaseConnectionDetails` -| Containers of type `CouchbaseContainer` - -| `ElasticsearchConnectionDetails` -| Containers of type `ElasticsearchContainer` - -| `FlywayConnectionDetails` -| Containers of type `JdbcDatabaseContainer` - -| `JdbcConnectionDetails` -| Containers of type `JdbcDatabaseContainer` - -| `KafkaConnectionDetails` -| Containers of type `KafkaContainer` or `RedpandaContainer` - -| `LiquibaseConnectionDetails` -| Containers of type `JdbcDatabaseContainer` - -| `MongoConnectionDetails` -| Containers of type `MongoDBContainer` - -| `Neo4jConnectionDetails` -| Containers of type `Neo4jContainer` - -| `OtlpMetricsConnectionDetails` -| Containers named "otel/opentelemetry-collector-contrib" - -| `OtlpTracingConnectionDetails` -| Containers named "otel/opentelemetry-collector-contrib" - -| `PulsarConnectionDetails` -| Containers of type `PulsarContainer` - -| `R2dbcConnectionDetails` -| Containers of type `MariaDBContainer`, `MSSQLServerContainer`, `MySQLContainer`, `OracleContainer`, or `PostgreSQLContainer` - -| `RabbitConnectionDetails` -| Containers of type `RabbitMQContainer` - -| `RedisConnectionDetails` -| Containers named "redis" - -| `ZipkinConnectionDetails` -| Containers named "openzipkin/zipkin" -|=== - -[TIP] -==== -By default all applicable connection details beans will be created for a given `Container`. -For example, a `PostgreSQLContainer` will create both `JdbcConnectionDetails` and `R2dbcConnectionDetails`. - -If you want to create only a subset of the applicable types, you can use the `type` attribute of `@ServiceConnection`. -==== - -By default `Container.getDockerImageName()` is used to obtain the name used to find connection details. -This works as long as Spring Boot is able to get the instance of the `Container`, which is the case when using a `static` field like in the example above. - -If you're using a `@Bean` method, Spring Boot won't call the bean method to get the Docker image name, because this would cause eager initialization issues. -Instead, the return type of the bean method is used to find out which connection detail should be used. -This works as long as you're using typed containers, e.g. `Neo4jContainer` or `RabbitMQContainer`. -This stops working if you're using `GenericContainer`, e.g. with Redis, as shown in the following example: - -include-code::MyRedisConfiguration[] - -Spring Boot can't tell from `GenericContainer` which container image is used, so the `name` attribute from `@ServiceConnection` must be used to provide that hint. - -You can also use the `name` attribute of `@ServiceConnection` to override which connection detail will be used, for example when using custom images. -If you are using the Docker image `registry.mycompany.com/mirror/myredis`, you'd use `@ServiceConnection(name="redis")` to ensure `RedisConnectionDetails` are created. - - - -[[features.testing.testcontainers.dynamic-properties]] -=== Dynamic Properties - -A slightly more verbose but also more flexible alternative to service connections is `@DynamicPropertySource`. -A static `@DynamicPropertySource` method allows adding dynamic property values to the Spring Environment. - -include-code::MyIntegrationTests[] - -The above configuration allows Neo4j-related beans in the application to communicate with Neo4j running inside the Testcontainers-managed Docker container. - - - -[[features.testing.utilities]] -== Test Utilities - -A few test utility classes that are generally useful when testing your application are packaged as part of `spring-boot`. - - - -[[features.testing.utilities.config-data-application-context-initializer]] -=== ConfigDataApplicationContextInitializer - -`ConfigDataApplicationContextInitializer` is an `ApplicationContextInitializer` that you can apply to your tests to load Spring Boot `application.properties` files. -You can use it when you do not need the full set of features provided by `@SpringBootTest`, as shown in the following example: - -include-code::MyConfigFileTests[] - -NOTE: Using `ConfigDataApplicationContextInitializer` alone does not provide support for `@Value("${...}")` injection. -Its only job is to ensure that `application.properties` files are loaded into Spring's `Environment`. -For `@Value` support, you need to either additionally configure a `PropertySourcesPlaceholderConfigurer` or use `@SpringBootTest`, which auto-configures one for you. - - - -[[features.testing.utilities.test-property-values]] -=== TestPropertyValues - -`TestPropertyValues` lets you quickly add properties to a `ConfigurableEnvironment` or `ConfigurableApplicationContext`. -You can call it with `key=value` strings, as follows: - -include-code::MyEnvironmentTests[] - - - -[[features.testing.utilities.output-capture]] -=== OutputCapture - -`OutputCapture` is a JUnit `Extension` that you can use to capture `System.out` and `System.err` output. -To use it, add `@ExtendWith(OutputCaptureExtension.class)` and inject `CapturedOutput` as an argument to your test class constructor or test method as follows: - -include-code::MyOutputCaptureTests[] - - - -[[features.testing.utilities.test-rest-template]] -=== TestRestTemplate - -`TestRestTemplate` is a convenience alternative to Spring's `RestTemplate` that is useful in integration tests. -You can get a vanilla template or one that sends Basic HTTP authentication (with a username and password). -In either case, the template is fault tolerant. -This means that it behaves in a test-friendly way by not throwing exceptions on 4xx and 5xx errors. -Instead, such errors can be detected through the returned `ResponseEntity` and its status code. - -TIP: Spring Framework 5.0 provides a new `WebTestClient` that works for xref:features/testing.adoc#features.testing.spring-boot-applications.spring-webflux-tests[WebFlux integration tests] and both xref:features/testing.adoc#features.testing.spring-boot-applications.with-running-server[WebFlux and MVC end-to-end testing]. -It provides a fluent API for assertions, unlike `TestRestTemplate`. - -It is recommended, but not mandatory, to use the Apache HTTP Client (version 5.1 or better). -If you have that on your classpath, the `TestRestTemplate` responds by configuring the client appropriately. -If you do use Apache's HTTP client, some additional test-friendly features are enabled: - -* Redirects are not followed (so you can assert the response location). -* Cookies are ignored (so the template is stateless). - -`TestRestTemplate` can be instantiated directly in your integration tests, as shown in the following example: - -include-code::MyTests[] - -Alternatively, if you use the `@SpringBootTest` annotation with `WebEnvironment.RANDOM_PORT` or `WebEnvironment.DEFINED_PORT`, you can inject a fully configured `TestRestTemplate` and start using it. -If necessary, additional customizations can be applied through the `RestTemplateBuilder` bean. -Any URLs that do not specify a host and port automatically connect to the embedded server, as shown in the following example: - -include-code::MySpringBootTests[] diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/test-scope-dependencies.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/test-scope-dependencies.adoc new file mode 100644 index 0000000000..e83313d592 --- /dev/null +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/test-scope-dependencies.adoc @@ -0,0 +1,16 @@ +[[testing.test-scope-dependencies]] += Test Scope Dependencies + +The `spring-boot-starter-test` "`Starter`" (in the `test` `scope`) contains the following provided libraries: + +* https://junit.org/junit5/[JUnit 5]: The de-facto standard for unit testing Java applications. +* {url-spring-framework-docs}/testing/integration.html[Spring Test] & Spring Boot Test: Utilities and integration test support for Spring Boot applications. +* https://assertj.github.io/doc/[AssertJ]: A fluent assertion library. +* https://github.com/hamcrest/JavaHamcrest[Hamcrest]: A library of matcher objects (also known as constraints or predicates). +* https://site.mockito.org/[Mockito]: A Java mocking framework. +* https://github.com/skyscreamer/JSONassert[JSONassert]: An assertion library for JSON. +* https://github.com/jayway/JsonPath[JsonPath]: XPath for JSON. +* https://github.com/awaitility/awaitility[Awaitility]: A library for testing asynchronous systems. + +We generally find these common libraries to be useful when writing tests. +If these libraries do not suit your needs, you can add additional test dependencies of your own. diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/test-utilities.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/test-utilities.adoc new file mode 100644 index 0000000000..9b82a7567e --- /dev/null +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/test-utilities.adoc @@ -0,0 +1,69 @@ +[[testing.utilities]] += Test Utilities + +A few test utility classes that are generally useful when testing your application are packaged as part of `spring-boot`. + + + +[[testing.utilities.config-data-application-context-initializer]] +== ConfigDataApplicationContextInitializer + +`ConfigDataApplicationContextInitializer` is an `ApplicationContextInitializer` that you can apply to your tests to load Spring Boot `application.properties` files. +You can use it when you do not need the full set of features provided by `@SpringBootTest`, as shown in the following example: + +include-code::MyConfigFileTests[] + +NOTE: Using `ConfigDataApplicationContextInitializer` alone does not provide support for `@Value("${...}")` injection. +Its only job is to ensure that `application.properties` files are loaded into Spring's `Environment`. +For `@Value` support, you need to either additionally configure a `PropertySourcesPlaceholderConfigurer` or use `@SpringBootTest`, which auto-configures one for you. + + + +[[testing.utilities.test-property-values]] +== TestPropertyValues + +`TestPropertyValues` lets you quickly add properties to a `ConfigurableEnvironment` or `ConfigurableApplicationContext`. +You can call it with `key=value` strings, as follows: + +include-code::MyEnvironmentTests[] + + + +[[testing.utilities.output-capture]] +== OutputCapture + +`OutputCapture` is a JUnit `Extension` that you can use to capture `System.out` and `System.err` output. +To use it, add `@ExtendWith(OutputCaptureExtension.class)` and inject `CapturedOutput` as an argument to your test class constructor or test method as follows: + +include-code::MyOutputCaptureTests[] + + + +[[testing.utilities.test-rest-template]] +== TestRestTemplate + +`TestRestTemplate` is a convenience alternative to Spring's `RestTemplate` that is useful in integration tests. +You can get a vanilla template or one that sends Basic HTTP authentication (with a username and password). +In either case, the template is fault tolerant. +This means that it behaves in a test-friendly way by not throwing exceptions on 4xx and 5xx errors. +Instead, such errors can be detected through the returned `ResponseEntity` and its status code. + +TIP: Spring Framework 5.0 provides a new `WebTestClient` that works for xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.spring-webflux-tests[WebFlux integration tests] and both xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.with-running-server[WebFlux and MVC end-to-end testing]. +It provides a fluent API for assertions, unlike `TestRestTemplate`. + +It is recommended, but not mandatory, to use the Apache HTTP Client (version 5.1 or better). +If you have that on your classpath, the `TestRestTemplate` responds by configuring the client appropriately. +If you do use Apache's HTTP client, some additional test-friendly features are enabled: + +* Redirects are not followed (so you can assert the response location). +* Cookies are ignored (so the template is stateless). + +`TestRestTemplate` can be instantiated directly in your integration tests, as shown in the following example: + +include-code::MyTests[] + +Alternatively, if you use the `@SpringBootTest` annotation with `WebEnvironment.RANDOM_PORT` or `WebEnvironment.DEFINED_PORT`, you can inject a fully configured `TestRestTemplate` and start using it. +If necessary, additional customizations can be applied through the `RestTemplateBuilder` bean. +Any URLs that do not specify a host and port automatically connect to the embedded server, as shown in the following example: + +include-code::MySpringBootTests[] diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/testcontainers.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/testcontainers.adoc new file mode 100644 index 0000000000..61dd3a335d --- /dev/null +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/testcontainers.adoc @@ -0,0 +1,129 @@ +[[testing.testcontainers]] += Testcontainers + +The https://www.testcontainers.org/[Testcontainers] library provides a way to manage services running inside Docker containers. +It integrates with JUnit, allowing you to write a test class that can start up a container before any of the tests run. +Testcontainers is especially useful for writing integration tests that talk to a real backend service such as MySQL, MongoDB, Cassandra and others. + +Testcontainers can be used in a Spring Boot test as follows: + +include-code::vanilla/MyIntegrationTests[] + +This will start up a docker container running Neo4j (if Docker is running locally) before any of the tests are run. +In most cases, you will need to configure the application to connect to the service running in the container. + + + +[[testing.testcontainers.service-connections]] +== Service Connections + +A service connection is a connection to any remote service. +Spring Boot's auto-configuration can consume the details of a service connection and use them to establish a connection to a remote service. +When doing so, the connection details take precedence over any connection-related configuration properties. + +When using Testcontainers, connection details can be automatically created for a service running in a container by annotating the container field in the test class. + +include-code::MyIntegrationTests[] + +Thanks to `@ServiceConnection`, the above configuration allows Neo4j-related beans in the application to communicate with Neo4j running inside the Testcontainers-managed Docker container. +This is done by automatically defining a `Neo4jConnectionDetails` bean which is then used by the Neo4j auto-configuration, overriding any connection-related configuration properties. + +NOTE: You'll need to add the `spring-boot-testcontainers` module as a test dependency in order to use service connections with Testcontainers. + +Service connection annotations are processed by `ContainerConnectionDetailsFactory` classes registered with `spring.factories`. +A `ContainerConnectionDetailsFactory` can create a `ConnectionDetails` bean based on a specific `Container` subclass, or the Docker image name. + +The following service connection factories are provided in the `spring-boot-testcontainers` jar: + +|=== +| Connection Details | Matched on + +| `ActiveMQConnectionDetails` +| Containers named "symptoma/activemq" or `ActiveMQContainer` + +| `ArtemisConnectionDetails` +| Containers of type `ArtemisContainer` + +| `CassandraConnectionDetails` +| Containers of type `CassandraContainer` + +| `CouchbaseConnectionDetails` +| Containers of type `CouchbaseContainer` + +| `ElasticsearchConnectionDetails` +| Containers of type `ElasticsearchContainer` + +| `FlywayConnectionDetails` +| Containers of type `JdbcDatabaseContainer` + +| `JdbcConnectionDetails` +| Containers of type `JdbcDatabaseContainer` + +| `KafkaConnectionDetails` +| Containers of type `KafkaContainer` or `RedpandaContainer` + +| `LiquibaseConnectionDetails` +| Containers of type `JdbcDatabaseContainer` + +| `MongoConnectionDetails` +| Containers of type `MongoDBContainer` + +| `Neo4jConnectionDetails` +| Containers of type `Neo4jContainer` + +| `OtlpMetricsConnectionDetails` +| Containers named "otel/opentelemetry-collector-contrib" + +| `OtlpTracingConnectionDetails` +| Containers named "otel/opentelemetry-collector-contrib" + +| `PulsarConnectionDetails` +| Containers of type `PulsarContainer` + +| `R2dbcConnectionDetails` +| Containers of type `MariaDBContainer`, `MSSQLServerContainer`, `MySQLContainer`, `OracleContainer`, or `PostgreSQLContainer` + +| `RabbitConnectionDetails` +| Containers of type `RabbitMQContainer` + +| `RedisConnectionDetails` +| Containers named "redis" + +| `ZipkinConnectionDetails` +| Containers named "openzipkin/zipkin" +|=== + +[TIP] +==== +By default all applicable connection details beans will be created for a given `Container`. +For example, a `PostgreSQLContainer` will create both `JdbcConnectionDetails` and `R2dbcConnectionDetails`. + +If you want to create only a subset of the applicable types, you can use the `type` attribute of `@ServiceConnection`. +==== + +By default `Container.getDockerImageName()` is used to obtain the name used to find connection details. +This works as long as Spring Boot is able to get the instance of the `Container`, which is the case when using a `static` field like in the example above. + +If you're using a `@Bean` method, Spring Boot won't call the bean method to get the Docker image name, because this would cause eager initialization issues. +Instead, the return type of the bean method is used to find out which connection detail should be used. +This works as long as you're using typed containers, e.g. `Neo4jContainer` or `RabbitMQContainer`. +This stops working if you're using `GenericContainer`, e.g. with Redis, as shown in the following example: + +include-code::MyRedisConfiguration[] + +Spring Boot can't tell from `GenericContainer` which container image is used, so the `name` attribute from `@ServiceConnection` must be used to provide that hint. + +You can also use the `name` attribute of `@ServiceConnection` to override which connection detail will be used, for example when using custom images. +If you are using the Docker image `registry.mycompany.com/mirror/myredis`, you'd use `@ServiceConnection(name="redis")` to ensure `RedisConnectionDetails` are created. + + + +[[testing.testcontainers.dynamic-properties]] +== Dynamic Properties + +A slightly more verbose but also more flexible alternative to service connections is `@DynamicPropertySource`. +A static `@DynamicPropertySource` method allows adding dynamic property values to the Spring Environment. + +include-code::MyIntegrationTests[] + +The above configuration allows Neo4j-related beans in the application to communicate with Neo4j running inside the Testcontainers-managed Docker container. diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/using/using-the-springbootapplication-annotation.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/using/using-the-springbootapplication-annotation.adoc index a7587e885d..2a4172f8f7 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/using/using-the-springbootapplication-annotation.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/using/using-the-springbootapplication-annotation.adoc @@ -7,7 +7,7 @@ A single `@SpringBootApplication` annotation can be used to enable those three f * `@EnableAutoConfiguration`: enable xref:using/auto-configuration.adoc[Spring Boot's auto-configuration mechanism] * `@ComponentScan`: enable `@Component` scan on the package where the application is located (see xref:using/structuring-your-code.adoc[the best practices]) * `@SpringBootConfiguration`: enable registration of extra beans in the context or the import of additional configuration classes. -An alternative to Spring's standard `@Configuration` that aids xref:features/testing.adoc#features.testing.spring-boot-applications.detecting-configuration[configuration detection] in your integration tests. +An alternative to Spring's standard `@Configuration` that aids xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.detecting-configuration[configuration detection] in your integration tests. include-code::springapplication/MyApplication[] diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/partials/nav-reference.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/partials/nav-reference.adoc index 3c6c29953c..04aba4b93d 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/partials/nav-reference.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/partials/nav-reference.adoc @@ -19,7 +19,6 @@ *** xref:reference:features/aop.adoc[] *** xref:reference:features/json.adoc[] *** xref:reference:features/task-execution-and-scheduling.adoc[] -*** xref:reference:features/testing.adoc[] *** xref:reference:features/dev-services.adoc[] *** xref:reference:features/developing-auto-configuration.adoc[] *** xref:reference:features/kotlin.adoc[] @@ -57,6 +56,13 @@ *** xref:reference:messaging/spring-integration.adoc[] *** xref:reference:messaging/websockets.adoc[] +** xref:reference:testing/index.adoc[] +*** xref:reference:testing/test-scope-dependencies.adoc[] +*** xref:reference:testing/spring-applications.adoc[] +*** xref:reference:testing/spring-boot-applications.adoc[] +*** xref:reference:testing/testcontainers.adoc[] +*** xref:reference:testing/test-utilities.adoc[] + ** xref:reference:container-images/index.adoc[] *** xref:reference:container-images/efficient-images.adoc[] *** xref:reference:container-images/dockerfiles.adoc[] diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/additionalautoconfigurationandslicing/MyJdbcTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/additionalautoconfigurationandslicing/MyJdbcTests.java similarity index 83% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/additionalautoconfigurationandslicing/MyJdbcTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/additionalautoconfigurationandslicing/MyJdbcTests.java index b2f9aadc36..8de55f68ff 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/additionalautoconfigurationandslicing/MyJdbcTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/additionalautoconfigurationandslicing/MyJdbcTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.additionalautoconfigurationandslicing; +package org.springframework.boot.docs.testing.springbootapplications.additionalautoconfigurationandslicing; import org.springframework.boot.autoconfigure.ImportAutoConfiguration; import org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredjdbc/MyTransactionalTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredjdbc/MyTransactionalTests.java similarity index 84% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredjdbc/MyTransactionalTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredjdbc/MyTransactionalTests.java index 944e1ca34c..5abc234b4e 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredjdbc/MyTransactionalTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredjdbc/MyTransactionalTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredjdbc; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredjdbc; import org.springframework.boot.test.autoconfigure.jdbc.JdbcTest; import org.springframework.transaction.annotation.Propagation; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredjooq/MyJooqTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredjooq/MyJooqTests.java similarity index 84% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredjooq/MyJooqTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredjooq/MyJooqTests.java index 16e631e17a..2039407647 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredjooq/MyJooqTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredjooq/MyJooqTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredjooq; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredjooq; import org.jooq.DSLContext; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredrestclient/MyRestClientServiceTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredrestclient/MyRestClientServiceTests.java similarity index 90% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredrestclient/MyRestClientServiceTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredrestclient/MyRestClientServiceTests.java index 8d8437fc8f..26f57b7966 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredrestclient/MyRestClientServiceTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredrestclient/MyRestClientServiceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredrestclient; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredrestclient; import org.junit.jupiter.api.Test; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredrestclient/MyRestTemplateServiceTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredrestclient/MyRestTemplateServiceTests.java similarity index 84% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredrestclient/MyRestTemplateServiceTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredrestclient/MyRestTemplateServiceTests.java index fdf67b9621..9f910024ec 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredrestclient/MyRestTemplateServiceTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredrestclient/MyRestTemplateServiceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredrestclient; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredrestclient; import org.junit.jupiter.api.Test; @@ -27,7 +27,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo; import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess; -@RestClientTest(RemoteVehicleDetailsService.class) +@RestClientTest(org.springframework.boot.docs.testing.springbootapplications.autoconfiguredrestclient.RemoteVehicleDetailsService.class) class MyRestTemplateServiceTests { @Autowired diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredrestclient/RemoteVehicleDetailsService.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredrestclient/RemoteVehicleDetailsService.java similarity index 80% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredrestclient/RemoteVehicleDetailsService.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredrestclient/RemoteVehicleDetailsService.java index 6bfd672ac4..96ce772ac5 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredrestclient/RemoteVehicleDetailsService.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredrestclient/RemoteVehicleDetailsService.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredrestclient; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredrestclient; class RemoteVehicleDetailsService { diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatacassandra/MyDataCassandraTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatacassandra/MyDataCassandraTests.java similarity index 83% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatacassandra/MyDataCassandraTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatacassandra/MyDataCassandraTests.java index 639686461c..6b9ced3543 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatacassandra/MyDataCassandraTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatacassandra/MyDataCassandraTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringdatacassandra; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringdatacassandra; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.data.cassandra.DataCassandraTest; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataredis/SomeRepository.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatacassandra/SomeRepository.java similarity index 78% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataredis/SomeRepository.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatacassandra/SomeRepository.java index 1a792e60dd..33ab6cc034 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataredis/SomeRepository.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatacassandra/SomeRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringdataredis; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringdatacassandra; interface SomeRepository { diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatacouchbase/MyDataCouchbaseTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatacouchbase/MyDataCouchbaseTests.java similarity index 83% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatacouchbase/MyDataCouchbaseTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatacouchbase/MyDataCouchbaseTests.java index 34e1022451..f11c1aee38 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatacouchbase/MyDataCouchbaseTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatacouchbase/MyDataCouchbaseTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringdatacouchbase; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringdatacouchbase; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.data.couchbase.DataCouchbaseTest; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatacassandra/SomeRepository.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatacouchbase/SomeRepository.java similarity index 78% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatacassandra/SomeRepository.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatacouchbase/SomeRepository.java index 7cf8ce7203..1065110d1f 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatacassandra/SomeRepository.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatacouchbase/SomeRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringdatacassandra; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringdatacouchbase; interface SomeRepository { diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataelasticsearch/MyDataElasticsearchTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataelasticsearch/MyDataElasticsearchTests.java similarity index 83% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataelasticsearch/MyDataElasticsearchTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataelasticsearch/MyDataElasticsearchTests.java index d2c0190773..4781b41d8f 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataelasticsearch/MyDataElasticsearchTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataelasticsearch/MyDataElasticsearchTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringdataelasticsearch; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringdataelasticsearch; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.data.elasticsearch.DataElasticsearchTest; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataelasticsearch/SomeRepository.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataelasticsearch/SomeRepository.java similarity index 77% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataelasticsearch/SomeRepository.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataelasticsearch/SomeRepository.java index 3a41f2cae6..b53e6f640c 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataelasticsearch/SomeRepository.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataelasticsearch/SomeRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringdataelasticsearch; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringdataelasticsearch; public interface SomeRepository { diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatajpa/MyNonTransactionalTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatajpa/MyNonTransactionalTests.java similarity index 84% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatajpa/MyNonTransactionalTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatajpa/MyNonTransactionalTests.java index 90ba61f255..7ffc7cd0e0 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatajpa/MyNonTransactionalTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatajpa/MyNonTransactionalTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringdatajpa; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringdatajpa; import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; import org.springframework.transaction.annotation.Propagation; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatajpa/withdb/MyRepositoryTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatajpa/withdb/MyRepositoryTests.java similarity index 84% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatajpa/withdb/MyRepositoryTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatajpa/withdb/MyRepositoryTests.java index 16aca2b282..1346c85160 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatajpa/withdb/MyRepositoryTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatajpa/withdb/MyRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringdatajpa.withdb; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringdatajpa.withdb; import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase; import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase.Replace; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatajpa/withoutdb/MyRepositoryTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatajpa/withoutdb/MyRepositoryTests.java similarity index 88% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatajpa/withoutdb/MyRepositoryTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatajpa/withoutdb/MyRepositoryTests.java index 74205bc8a3..4f103e622b 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatajpa/withoutdb/MyRepositoryTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatajpa/withoutdb/MyRepositoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringdatajpa.withoutdb; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringdatajpa.withoutdb; import org.junit.jupiter.api.Test; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatajpa/withoutdb/User.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatajpa/withoutdb/User.java similarity index 80% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatajpa/withoutdb/User.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatajpa/withoutdb/User.java index c3656b8129..6a467a7b35 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatajpa/withoutdb/User.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatajpa/withoutdb/User.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringdatajpa.withoutdb; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringdatajpa.withoutdb; class User { diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatajpa/withoutdb/UserRepository.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatajpa/withoutdb/UserRepository.java similarity index 78% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatajpa/withoutdb/UserRepository.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatajpa/withoutdb/UserRepository.java index 5b2e6963be..2608965890 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatajpa/withoutdb/UserRepository.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatajpa/withoutdb/UserRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringdatajpa.withoutdb; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringdatajpa.withoutdb; interface UserRepository { diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataldap/inmemory/MyDataLdapTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataldap/inmemory/MyDataLdapTests.java similarity index 83% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataldap/inmemory/MyDataLdapTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataldap/inmemory/MyDataLdapTests.java index cb95fd2df0..b28c6da9ed 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataldap/inmemory/MyDataLdapTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataldap/inmemory/MyDataLdapTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringdataldap.inmemory; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringdataldap.inmemory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.data.ldap.DataLdapTest; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataldap/server/MyDataLdapTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataldap/server/MyDataLdapTests.java similarity index 83% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataldap/server/MyDataLdapTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataldap/server/MyDataLdapTests.java index 81a21ddec4..45821a0cf1 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataldap/server/MyDataLdapTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataldap/server/MyDataLdapTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringdataldap.server; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringdataldap.server; import org.springframework.boot.autoconfigure.ldap.embedded.EmbeddedLdapAutoConfiguration; import org.springframework.boot.test.autoconfigure.data.ldap.DataLdapTest; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatamongodb/MyDataMongoDbTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatamongodb/MyDataMongoDbTests.java similarity index 84% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatamongodb/MyDataMongoDbTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatamongodb/MyDataMongoDbTests.java index cd3f5739cd..3cff47d538 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatamongodb/MyDataMongoDbTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdatamongodb/MyDataMongoDbTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringdatamongodb; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringdatamongodb; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.data.mongo.DataMongoTest; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataneo4j/nopropagation/MyDataNeo4jTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataneo4j/nopropagation/MyDataNeo4jTests.java similarity index 83% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataneo4j/nopropagation/MyDataNeo4jTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataneo4j/nopropagation/MyDataNeo4jTests.java index ff923a9e83..1cc5220432 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataneo4j/nopropagation/MyDataNeo4jTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataneo4j/nopropagation/MyDataNeo4jTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringdataneo4j.nopropagation; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringdataneo4j.nopropagation; import org.springframework.boot.test.autoconfigure.data.neo4j.DataNeo4jTest; import org.springframework.transaction.annotation.Propagation; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataneo4j/propagation/MyDataNeo4jTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataneo4j/propagation/MyDataNeo4jTests.java similarity index 82% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataneo4j/propagation/MyDataNeo4jTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataneo4j/propagation/MyDataNeo4jTests.java index f7a4cfe592..b80a53050c 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataneo4j/propagation/MyDataNeo4jTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataneo4j/propagation/MyDataNeo4jTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringdataneo4j.propagation; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringdataneo4j.propagation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.data.neo4j.DataNeo4jTest; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatacouchbase/SomeRepository.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataneo4j/propagation/SomeRepository.java similarity index 78% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatacouchbase/SomeRepository.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataneo4j/propagation/SomeRepository.java index ccce557307..b5d5f9c9ad 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdatacouchbase/SomeRepository.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataneo4j/propagation/SomeRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringdatacouchbase; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringdataneo4j.propagation; interface SomeRepository { diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataredis/MyDataRedisTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataredis/MyDataRedisTests.java similarity index 83% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataredis/MyDataRedisTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataredis/MyDataRedisTests.java index d5a58d5a17..55cd050447 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataredis/MyDataRedisTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataredis/MyDataRedisTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringdataredis; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringdataredis; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.data.redis.DataRedisTest; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataneo4j/propagation/SomeRepository.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataredis/SomeRepository.java similarity index 77% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataneo4j/propagation/SomeRepository.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataredis/SomeRepository.java index b905dbe206..aa329cf1a0 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringdataneo4j/propagation/SomeRepository.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringdataredis/SomeRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringdataneo4j.propagation; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringdataredis; interface SomeRepository { diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/MyRestDocsConfiguration.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/MyRestDocsConfiguration.java similarity index 87% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/MyRestDocsConfiguration.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/MyRestDocsConfiguration.java index 149dc47d4d..af3077bf02 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/MyRestDocsConfiguration.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/MyRestDocsConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringrestdocs.withmockmvc; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringrestdocs.withmockmvc; import org.springframework.boot.test.autoconfigure.restdocs.RestDocsMockMvcConfigurationCustomizer; import org.springframework.boot.test.context.TestConfiguration; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/MyResultHandlerConfiguration.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/MyResultHandlerConfiguration.java similarity index 85% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/MyResultHandlerConfiguration.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/MyResultHandlerConfiguration.java index 51a9d31f07..18104aeb5c 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/MyResultHandlerConfiguration.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/MyResultHandlerConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringrestdocs.withmockmvc; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringrestdocs.withmockmvc; import org.springframework.boot.test.context.TestConfiguration; import org.springframework.context.annotation.Bean; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/MyUserDocumentationTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/MyUserDocumentationTests.java similarity index 89% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/MyUserDocumentationTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/MyUserDocumentationTests.java index 539e87799f..a84d10deca 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/MyUserDocumentationTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/MyUserDocumentationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringrestdocs.withmockmvc; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringrestdocs.withmockmvc; import org.junit.jupiter.api.Test; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/UserController.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/UserController.java similarity index 77% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/UserController.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/UserController.java index f920a83805..9c94a3ecd3 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/UserController.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withmockmvc/UserController.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringrestdocs.withmockmvc; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringrestdocs.withmockmvc; class UserController { diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withrestassured/MyRestDocsConfiguration.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withrestassured/MyRestDocsConfiguration.java similarity index 86% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withrestassured/MyRestDocsConfiguration.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withrestassured/MyRestDocsConfiguration.java index 699b5e3747..b932434346 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withrestassured/MyRestDocsConfiguration.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withrestassured/MyRestDocsConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringrestdocs.withrestassured; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringrestdocs.withrestassured; import org.springframework.boot.test.autoconfigure.restdocs.RestDocsRestAssuredConfigurationCustomizer; import org.springframework.boot.test.context.TestConfiguration; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withrestassured/MyUserDocumentationTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withrestassured/MyUserDocumentationTests.java similarity index 89% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withrestassured/MyUserDocumentationTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withrestassured/MyUserDocumentationTests.java index d3a4f8c062..3ff16a1f17 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withrestassured/MyUserDocumentationTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withrestassured/MyUserDocumentationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringrestdocs.withrestassured; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringrestdocs.withrestassured; import io.restassured.specification.RequestSpecification; import org.junit.jupiter.api.Test; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withwebtestclient/MyRestDocsConfiguration.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withwebtestclient/MyRestDocsConfiguration.java similarity index 86% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withwebtestclient/MyRestDocsConfiguration.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withwebtestclient/MyRestDocsConfiguration.java index b1d7694ceb..5d7d27d595 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withwebtestclient/MyRestDocsConfiguration.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withwebtestclient/MyRestDocsConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringrestdocs.withwebtestclient; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringrestdocs.withwebtestclient; import org.springframework.boot.test.autoconfigure.restdocs.RestDocsWebTestClientConfigurationCustomizer; import org.springframework.boot.test.context.TestConfiguration; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withwebtestclient/MyUsersDocumentationTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withwebtestclient/MyUsersDocumentationTests.java similarity index 88% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withwebtestclient/MyUsersDocumentationTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withwebtestclient/MyUsersDocumentationTests.java index a83b763b94..e872bcfe34 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withwebtestclient/MyUsersDocumentationTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withwebtestclient/MyUsersDocumentationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringrestdocs.withwebtestclient; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringrestdocs.withwebtestclient; import org.junit.jupiter.api.Test; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withwebtestclient/MyWebTestClientBuilderCustomizerConfiguration.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withwebtestclient/MyWebTestClientBuilderCustomizerConfiguration.java similarity index 86% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withwebtestclient/MyWebTestClientBuilderCustomizerConfiguration.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withwebtestclient/MyWebTestClientBuilderCustomizerConfiguration.java index 8713104daa..2cb31138c1 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredspringrestdocs/withwebtestclient/MyWebTestClientBuilderCustomizerConfiguration.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredspringrestdocs/withwebtestclient/MyWebTestClientBuilderCustomizerConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringrestdocs.withwebtestclient; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredspringrestdocs.withwebtestclient; import org.springframework.boot.test.context.TestConfiguration; import org.springframework.boot.test.web.reactive.server.WebTestClientBuilderCustomizer; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredwebservices/client/MyWebServiceClientTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredwebservices/client/MyWebServiceClientTests.java similarity index 90% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredwebservices/client/MyWebServiceClientTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredwebservices/client/MyWebServiceClientTests.java index 41d204e11b..2844a20433 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredwebservices/client/MyWebServiceClientTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredwebservices/client/MyWebServiceClientTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredwebservices.client; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredwebservices.client; import org.junit.jupiter.api.Test; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredwebservices/client/Request.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredwebservices/client/Request.java similarity index 80% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredwebservices/client/Request.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredwebservices/client/Request.java index 42fbbeeaf8..f346077e37 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredwebservices/client/Request.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredwebservices/client/Request.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredwebservices.client; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredwebservices.client; import jakarta.xml.bind.annotation.XmlRootElement; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredwebservices/client/Response.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredwebservices/client/Response.java similarity index 84% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredwebservices/client/Response.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredwebservices/client/Response.java index 31a93c5328..8c2dbaad7a 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredwebservices/client/Response.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredwebservices/client/Response.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredwebservices.client; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredwebservices.client; import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessorType; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredwebservices/client/SomeWebService.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredwebservices/client/SomeWebService.java similarity index 86% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredwebservices/client/SomeWebService.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredwebservices/client/SomeWebService.java index 8418964d8c..77d02d6733 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredwebservices/client/SomeWebService.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredwebservices/client/SomeWebService.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredwebservices.client; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredwebservices.client; import org.springframework.boot.webservices.client.WebServiceTemplateBuilder; import org.springframework.stereotype.Service; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredwebservices/server/ExampleEndpoint.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredwebservices/server/ExampleEndpoint.java similarity index 86% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredwebservices/server/ExampleEndpoint.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredwebservices/server/ExampleEndpoint.java index 56c7adfdcb..132040819c 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredwebservices/server/ExampleEndpoint.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredwebservices/server/ExampleEndpoint.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredwebservices.server; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredwebservices.server; import javax.xml.transform.Source; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredwebservices/server/MyWebServiceServerTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredwebservices/server/MyWebServiceServerTests.java similarity index 83% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredwebservices/server/MyWebServiceServerTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredwebservices/server/MyWebServiceServerTests.java index cb2bd460ca..52775d7312 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/autoconfiguredwebservices/server/MyWebServiceServerTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/autoconfiguredwebservices/server/MyWebServiceServerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,12 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredwebservices.server; +package org.springframework.boot.docs.testing.springbootapplications.autoconfiguredwebservices.server; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredwebservices.server.ExampleEndpoint; import org.springframework.boot.test.autoconfigure.webservices.server.WebServiceServerTest; import org.springframework.ws.test.server.MockWebServiceClient; import org.springframework.ws.test.server.RequestCreators; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/detectingwebapptype/MyWebFluxTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/detectingwebapptype/MyWebFluxTests.java similarity index 82% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/detectingwebapptype/MyWebFluxTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/detectingwebapptype/MyWebFluxTests.java index 6aebffbd26..9f9522c885 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/detectingwebapptype/MyWebFluxTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/detectingwebapptype/MyWebFluxTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.detectingwebapptype; +package org.springframework.boot.docs.testing.springbootapplications.detectingwebapptype; import org.springframework.boot.test.context.SpringBootTest; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/excludingconfiguration/MyTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/excludingconfiguration/MyTests.java similarity index 84% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/excludingconfiguration/MyTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/excludingconfiguration/MyTests.java index 34ddeb8ede..d62ddb0a33 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/excludingconfiguration/MyTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/excludingconfiguration/MyTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.excludingconfiguration; +package org.springframework.boot.docs.testing.springbootapplications.excludingconfiguration; import org.junit.jupiter.api.Test; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/excludingconfiguration/MyTestsConfiguration.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/excludingconfiguration/MyTestsConfiguration.java similarity index 79% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/excludingconfiguration/MyTestsConfiguration.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/excludingconfiguration/MyTestsConfiguration.java index be77994985..9eb98ff3fa 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/excludingconfiguration/MyTestsConfiguration.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/excludingconfiguration/MyTestsConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.excludingconfiguration; +package org.springframework.boot.docs.testing.springbootapplications.excludingconfiguration; class MyTestsConfiguration { diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/jmx/MyJmxTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/jmx/MyJmxTests.java similarity index 89% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/jmx/MyJmxTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/jmx/MyJmxTests.java index 606b179760..5e879d63d4 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/jmx/MyJmxTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/jmx/MyJmxTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.jmx; +package org.springframework.boot.docs.testing.springbootapplications.jmx; import javax.management.MBeanServer; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/jmx/SampleApp.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/jmx/SampleApp.java similarity index 86% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/jmx/SampleApp.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/jmx/SampleApp.java index e6d101f0c2..599c05516c 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/jmx/SampleApp.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/jmx/SampleApp.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.jmx; +package org.springframework.boot.docs.testing.springbootapplications.jmx; import org.springframework.boot.SpringBootConfiguration; import org.springframework.boot.autoconfigure.ImportAutoConfiguration; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/jsontests/MyJsonAssertJTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/jsontests/MyJsonAssertJTests.java similarity index 90% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/jsontests/MyJsonAssertJTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/jsontests/MyJsonAssertJTests.java index 354009771c..5c453111c9 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/jsontests/MyJsonAssertJTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/jsontests/MyJsonAssertJTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.jsontests; +package org.springframework.boot.docs.testing.springbootapplications.jsontests; import org.junit.jupiter.api.Test; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/jsontests/MyJsonTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/jsontests/MyJsonTests.java similarity index 92% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/jsontests/MyJsonTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/jsontests/MyJsonTests.java index 027bb69a97..a3772d5964 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/jsontests/MyJsonTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/jsontests/MyJsonTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.jsontests; +package org.springframework.boot.docs.testing.springbootapplications.jsontests; import org.junit.jupiter.api.Test; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/jsontests/SomeObject.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/jsontests/SomeObject.java similarity index 81% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/jsontests/SomeObject.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/jsontests/SomeObject.java index b24cd2a98d..9026f0b01b 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/jsontests/SomeObject.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/jsontests/SomeObject.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.jsontests; +package org.springframework.boot.docs.testing.springbootapplications.jsontests; class SomeObject { diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/jsontests/VehicleDetails.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/jsontests/VehicleDetails.java similarity index 85% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/jsontests/VehicleDetails.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/jsontests/VehicleDetails.java index 8737b8fbaf..57edbcbc5b 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/jsontests/VehicleDetails.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/jsontests/VehicleDetails.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.jsontests; +package org.springframework.boot.docs.testing.springbootapplications.jsontests; class VehicleDetails { diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/mockingbeans/bean/MyTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/mockingbeans/bean/MyTests.java similarity index 89% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/mockingbeans/bean/MyTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/mockingbeans/bean/MyTests.java index 3afcdda548..835a0b3aa4 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/mockingbeans/bean/MyTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/mockingbeans/bean/MyTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.mockingbeans.bean; +package org.springframework.boot.docs.testing.springbootapplications.mockingbeans.bean; import org.junit.jupiter.api.Test; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/mockingbeans/bean/RemoteService.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/mockingbeans/bean/RemoteService.java similarity index 80% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/mockingbeans/bean/RemoteService.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/mockingbeans/bean/RemoteService.java index 1c07923164..cc1efb78ba 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/mockingbeans/bean/RemoteService.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/mockingbeans/bean/RemoteService.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.mockingbeans.bean; +package org.springframework.boot.docs.testing.springbootapplications.mockingbeans.bean; class RemoteService { diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/mockingbeans/bean/Reverser.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/mockingbeans/bean/Reverser.java similarity index 80% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/mockingbeans/bean/Reverser.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/mockingbeans/bean/Reverser.java index f98a35807f..9dea16e7ff 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/mockingbeans/bean/Reverser.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/mockingbeans/bean/Reverser.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.mockingbeans.bean; +package org.springframework.boot.docs.testing.springbootapplications.mockingbeans.bean; class Reverser { diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/mockingbeans/listener/MyConfig.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/mockingbeans/listener/MyConfig.java similarity index 79% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/mockingbeans/listener/MyConfig.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/mockingbeans/listener/MyConfig.java index c0a7835cac..6bdd8ca09e 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/mockingbeans/listener/MyConfig.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/mockingbeans/listener/MyConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.mockingbeans.listener; +package org.springframework.boot.docs.testing.springbootapplications.mockingbeans.listener; class MyConfig { diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/mockingbeans/listener/MyTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/mockingbeans/listener/MyTests.java similarity index 86% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/mockingbeans/listener/MyTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/mockingbeans/listener/MyTests.java index 66f43b2f3d..37503868a5 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/mockingbeans/listener/MyTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/mockingbeans/listener/MyTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.mockingbeans.listener; +package org.springframework.boot.docs.testing.springbootapplications.mockingbeans.listener; import org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener; import org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springgraphqltests/GraphQlIntegrationTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springgraphqltests/GraphQlIntegrationTests.java similarity index 90% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springgraphqltests/GraphQlIntegrationTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springgraphqltests/GraphQlIntegrationTests.java index 5e07dd2c85..c1a44cd3f7 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springgraphqltests/GraphQlIntegrationTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springgraphqltests/GraphQlIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.springgraphqltests; +package org.springframework.boot.docs.testing.springbootapplications.springgraphqltests; import org.junit.jupiter.api.Test; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springgraphqltests/GreetingControllerTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springgraphqltests/GreetingControllerTests.java similarity index 90% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springgraphqltests/GreetingControllerTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springgraphqltests/GreetingControllerTests.java index a1de2f6e05..5582fee6ab 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springgraphqltests/GreetingControllerTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springgraphqltests/GreetingControllerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.springgraphqltests; +package org.springframework.boot.docs.testing.springbootapplications.springgraphqltests; import org.junit.jupiter.api.Test; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springmvctests/MyControllerTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springmvctests/MyControllerTests.java similarity index 87% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springmvctests/MyControllerTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springmvctests/MyControllerTests.java index cce533a272..f146667f03 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springmvctests/MyControllerTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springmvctests/MyControllerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,12 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.springmvctests; +package org.springframework.boot.docs.testing.springbootapplications.springmvctests; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.docs.features.testing.springbootapplications.springmvctests.UserVehicleController; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.http.MediaType; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springmvctests/MyHtmlUnitTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springmvctests/MyHtmlUnitTests.java similarity index 85% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springmvctests/MyHtmlUnitTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springmvctests/MyHtmlUnitTests.java index 5d0b4b5bc9..7d16efb483 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springmvctests/MyHtmlUnitTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springmvctests/MyHtmlUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,13 +14,14 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.springmvctests; +package org.springframework.boot.docs.testing.springbootapplications.springmvctests; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.html.HtmlPage; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.docs.features.testing.springbootapplications.springmvctests.UserVehicleController; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.mock.mockito.MockBean; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springmvctests/UserVehicleController.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springmvctests/UserVehicleController.java similarity index 80% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springmvctests/UserVehicleController.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springmvctests/UserVehicleController.java index 504d724e10..5eaf98909c 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springmvctests/UserVehicleController.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springmvctests/UserVehicleController.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.springmvctests; +package org.springframework.boot.docs.testing.springbootapplications.springmvctests; class UserVehicleController { diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springmvctests/UserVehicleService.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springmvctests/UserVehicleService.java similarity index 81% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springmvctests/UserVehicleService.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springmvctests/UserVehicleService.java index f7b4f7c9fa..55aaaa4ba5 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springmvctests/UserVehicleService.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springmvctests/UserVehicleService.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.springmvctests; +package org.springframework.boot.docs.testing.springbootapplications.springmvctests; class UserVehicleService { diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springmvctests/VehicleDetails.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springmvctests/VehicleDetails.java similarity index 81% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springmvctests/VehicleDetails.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springmvctests/VehicleDetails.java index 73b81924fc..341d9c2120 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springmvctests/VehicleDetails.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springmvctests/VehicleDetails.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.springmvctests; +package org.springframework.boot.docs.testing.springbootapplications.springmvctests; class VehicleDetails { diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springwebfluxtests/MyControllerTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springwebfluxtests/MyControllerTests.java similarity index 85% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springwebfluxtests/MyControllerTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springwebfluxtests/MyControllerTests.java index fba3badfb0..86f66105b0 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springwebfluxtests/MyControllerTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springwebfluxtests/MyControllerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,12 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.springwebfluxtests; +package org.springframework.boot.docs.testing.springbootapplications.springwebfluxtests; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.docs.features.testing.springbootapplications.springwebfluxtests.UserVehicleController; import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.http.MediaType; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springwebfluxtests/UserVehicleController.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springwebfluxtests/UserVehicleController.java similarity index 79% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springwebfluxtests/UserVehicleController.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springwebfluxtests/UserVehicleController.java index 4e24609332..b550118581 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springwebfluxtests/UserVehicleController.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springwebfluxtests/UserVehicleController.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.springwebfluxtests; +package org.springframework.boot.docs.testing.springbootapplications.springwebfluxtests; class UserVehicleController { diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springwebfluxtests/UserVehicleService.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springwebfluxtests/UserVehicleService.java similarity index 81% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springwebfluxtests/UserVehicleService.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springwebfluxtests/UserVehicleService.java index c571ac3dd9..d95bb51ab5 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springwebfluxtests/UserVehicleService.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springwebfluxtests/UserVehicleService.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.springwebfluxtests; +package org.springframework.boot.docs.testing.springbootapplications.springwebfluxtests; class UserVehicleService { diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springwebfluxtests/VehicleDetails.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springwebfluxtests/VehicleDetails.java similarity index 80% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springwebfluxtests/VehicleDetails.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springwebfluxtests/VehicleDetails.java index 0645577d06..3353f1a265 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/springwebfluxtests/VehicleDetails.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/springwebfluxtests/VehicleDetails.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.springwebfluxtests; +package org.springframework.boot.docs.testing.springbootapplications.springwebfluxtests; class VehicleDetails { diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/userconfigurationandslicing/MyApplication.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/userconfigurationandslicing/MyApplication.java similarity index 83% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/userconfigurationandslicing/MyApplication.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/userconfigurationandslicing/MyApplication.java index 5cd33b1fc7..a20855ebf7 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/userconfigurationandslicing/MyApplication.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/userconfigurationandslicing/MyApplication.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.userconfigurationandslicing; +package org.springframework.boot.docs.testing.springbootapplications.userconfigurationandslicing; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.data.mongodb.config.EnableMongoAuditing; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/userconfigurationandslicing/MyMongoConfiguration.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/userconfigurationandslicing/MyMongoConfiguration.java similarity index 83% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/userconfigurationandslicing/MyMongoConfiguration.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/userconfigurationandslicing/MyMongoConfiguration.java index fb324003ea..dc3d583151 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/userconfigurationandslicing/MyMongoConfiguration.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/userconfigurationandslicing/MyMongoConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.userconfigurationandslicing; +package org.springframework.boot.docs.testing.springbootapplications.userconfigurationandslicing; import org.springframework.context.annotation.Configuration; import org.springframework.data.mongodb.config.EnableMongoAuditing; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/userconfigurationandslicing/MyWebConfiguration.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/userconfigurationandslicing/MyWebConfiguration.java similarity index 85% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/userconfigurationandslicing/MyWebConfiguration.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/userconfigurationandslicing/MyWebConfiguration.java index a4f7aba1a5..ff714209b5 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/userconfigurationandslicing/MyWebConfiguration.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/userconfigurationandslicing/MyWebConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.userconfigurationandslicing; +package org.springframework.boot.docs.testing.springbootapplications.userconfigurationandslicing; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/userconfigurationandslicing/MyWebMvcConfigurer.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/userconfigurationandslicing/MyWebMvcConfigurer.java similarity index 82% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/userconfigurationandslicing/MyWebMvcConfigurer.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/userconfigurationandslicing/MyWebMvcConfigurer.java index 30e4c01323..a6f8e31912 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/userconfigurationandslicing/MyWebMvcConfigurer.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/userconfigurationandslicing/MyWebMvcConfigurer.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.userconfigurationandslicing; +package org.springframework.boot.docs.testing.springbootapplications.userconfigurationandslicing; import org.springframework.stereotype.Component; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/userconfigurationandslicing/scan/MyApplication.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/userconfigurationandslicing/scan/MyApplication.java similarity index 83% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/userconfigurationandslicing/scan/MyApplication.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/userconfigurationandslicing/scan/MyApplication.java index b182836252..add512bfb0 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/userconfigurationandslicing/scan/MyApplication.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/userconfigurationandslicing/scan/MyApplication.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.userconfigurationandslicing.scan; +package org.springframework.boot.docs.testing.springbootapplications.userconfigurationandslicing.scan; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ComponentScan; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/usingapplicationarguments/MyApplicationArgumentTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/usingapplicationarguments/MyApplicationArgumentTests.java similarity index 87% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/usingapplicationarguments/MyApplicationArgumentTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/usingapplicationarguments/MyApplicationArgumentTests.java index c362c7ebf5..d6f294db14 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/usingapplicationarguments/MyApplicationArgumentTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/usingapplicationarguments/MyApplicationArgumentTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.usingapplicationarguments; +package org.springframework.boot.docs.testing.springbootapplications.usingapplicationarguments; import org.junit.jupiter.api.Test; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/usingmain/always/MyApplicationTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/usingmain/always/MyApplicationTests.java similarity index 85% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/usingmain/always/MyApplicationTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/usingmain/always/MyApplicationTests.java index 05a4be6e26..25affe804c 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/usingmain/always/MyApplicationTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/usingmain/always/MyApplicationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.usingmain.always; +package org.springframework.boot.docs.testing.springbootapplications.usingmain.always; import org.junit.jupiter.api.Test; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/usingmain/custom/MyApplication.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/usingmain/custom/MyApplication.java similarity index 87% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/usingmain/custom/MyApplication.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/usingmain/custom/MyApplication.java index 26a9687fb8..314ef90377 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/usingmain/custom/MyApplication.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/usingmain/custom/MyApplication.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.usingmain.custom; +package org.springframework.boot.docs.testing.springbootapplications.usingmain.custom; import org.springframework.boot.Banner; import org.springframework.boot.SpringApplication; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/usingmain/typical/MyApplication.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/usingmain/typical/MyApplication.java similarity index 84% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/usingmain/typical/MyApplication.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/usingmain/typical/MyApplication.java index 1c22341019..6165ab5879 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/usingmain/typical/MyApplication.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/usingmain/typical/MyApplication.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.usingmain.typical; +package org.springframework.boot.docs.testing.springbootapplications.usingmain.typical; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/withmockenvironment/MyMockMvcTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/withmockenvironment/MyMockMvcTests.java similarity index 91% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/withmockenvironment/MyMockMvcTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/withmockenvironment/MyMockMvcTests.java index b869d880f6..8fa8c548a1 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/withmockenvironment/MyMockMvcTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/withmockenvironment/MyMockMvcTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.withmockenvironment; +package org.springframework.boot.docs.testing.springbootapplications.withmockenvironment; import org.junit.jupiter.api.Test; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/withmockenvironment/MyMockWebTestClientTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/withmockenvironment/MyMockWebTestClientTests.java similarity index 88% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/withmockenvironment/MyMockWebTestClientTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/withmockenvironment/MyMockWebTestClientTests.java index 4fcd698b73..d197a7e01a 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/withmockenvironment/MyMockWebTestClientTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/withmockenvironment/MyMockWebTestClientTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.withmockenvironment; +package org.springframework.boot.docs.testing.springbootapplications.withmockenvironment; import org.junit.jupiter.api.Test; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/withrunningserver/MyRandomPortTestRestTemplateTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/withrunningserver/MyRandomPortTestRestTemplateTests.java similarity index 88% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/withrunningserver/MyRandomPortTestRestTemplateTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/withrunningserver/MyRandomPortTestRestTemplateTests.java index 8ed9f3f416..8b3c34b298 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/withrunningserver/MyRandomPortTestRestTemplateTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/withrunningserver/MyRandomPortTestRestTemplateTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.withrunningserver; +package org.springframework.boot.docs.testing.springbootapplications.withrunningserver; import org.junit.jupiter.api.Test; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/withrunningserver/MyRandomPortWebTestClientTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/withrunningserver/MyRandomPortWebTestClientTests.java similarity index 88% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/withrunningserver/MyRandomPortWebTestClientTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/withrunningserver/MyRandomPortWebTestClientTests.java index c7f660b67d..4198e9108c 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/springbootapplications/withrunningserver/MyRandomPortWebTestClientTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/springbootapplications/withrunningserver/MyRandomPortWebTestClientTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.withrunningserver; +package org.springframework.boot.docs.testing.springbootapplications.withrunningserver; import org.junit.jupiter.api.Test; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/testcontainers/dynamicproperties/MyIntegrationTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/testcontainers/dynamicproperties/MyIntegrationTests.java similarity index 89% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/testcontainers/dynamicproperties/MyIntegrationTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/testcontainers/dynamicproperties/MyIntegrationTests.java index c18823972d..7032586acf 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/testcontainers/dynamicproperties/MyIntegrationTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/testcontainers/dynamicproperties/MyIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.testcontainers.dynamicproperties; +package org.springframework.boot.docs.testing.testcontainers.dynamicproperties; import org.junit.jupiter.api.Test; import org.testcontainers.containers.Neo4jContainer; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/testcontainers/serviceconnections/MyIntegrationTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/testcontainers/serviceconnections/MyIntegrationTests.java similarity index 88% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/testcontainers/serviceconnections/MyIntegrationTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/testcontainers/serviceconnections/MyIntegrationTests.java index 5d19fe1132..8827213caa 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/testcontainers/serviceconnections/MyIntegrationTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/testcontainers/serviceconnections/MyIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.testcontainers.serviceconnections; +package org.springframework.boot.docs.testing.testcontainers.serviceconnections; import org.junit.jupiter.api.Test; import org.testcontainers.containers.Neo4jContainer; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/testcontainers/serviceconnections/MyRedisConfiguration.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/testcontainers/serviceconnections/MyRedisConfiguration.java similarity index 87% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/testcontainers/serviceconnections/MyRedisConfiguration.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/testcontainers/serviceconnections/MyRedisConfiguration.java index 38b2640557..e463aba10c 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/testcontainers/serviceconnections/MyRedisConfiguration.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/testcontainers/serviceconnections/MyRedisConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.testcontainers.serviceconnections; +package org.springframework.boot.docs.testing.testcontainers.serviceconnections; import org.testcontainers.containers.GenericContainer; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/testcontainers/vanilla/MyIntegrationTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/testcontainers/vanilla/MyIntegrationTests.java similarity index 88% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/testcontainers/vanilla/MyIntegrationTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/testcontainers/vanilla/MyIntegrationTests.java index 516575570a..1bfe8857cc 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/testcontainers/vanilla/MyIntegrationTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/testcontainers/vanilla/MyIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.testcontainers.vanilla; +package org.springframework.boot.docs.testing.testcontainers.vanilla; import org.junit.jupiter.api.Test; import org.testcontainers.containers.Neo4jContainer; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/utilities/configdataapplicationcontextinitializer/Config.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/utilities/configdataapplicationcontextinitializer/Config.java similarity index 78% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/utilities/configdataapplicationcontextinitializer/Config.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/utilities/configdataapplicationcontextinitializer/Config.java index 4994118822..a75412db22 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/utilities/configdataapplicationcontextinitializer/Config.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/utilities/configdataapplicationcontextinitializer/Config.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.utilities.configdataapplicationcontextinitializer; +package org.springframework.boot.docs.testing.utilities.configdataapplicationcontextinitializer; class Config { diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/utilities/configdataapplicationcontextinitializer/MyConfigFileTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/utilities/configdataapplicationcontextinitializer/MyConfigFileTests.java similarity index 84% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/utilities/configdataapplicationcontextinitializer/MyConfigFileTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/utilities/configdataapplicationcontextinitializer/MyConfigFileTests.java index 3799f6ed52..b281a94a5b 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/utilities/configdataapplicationcontextinitializer/MyConfigFileTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/utilities/configdataapplicationcontextinitializer/MyConfigFileTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.utilities.configdataapplicationcontextinitializer; +package org.springframework.boot.docs.testing.utilities.configdataapplicationcontextinitializer; import org.springframework.boot.test.context.ConfigDataApplicationContextInitializer; import org.springframework.test.context.ContextConfiguration; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/utilities/outputcapture/MyOutputCaptureTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/utilities/outputcapture/MyOutputCaptureTests.java similarity index 88% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/utilities/outputcapture/MyOutputCaptureTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/utilities/outputcapture/MyOutputCaptureTests.java index 589eef16a6..4777af30ce 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/utilities/outputcapture/MyOutputCaptureTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/utilities/outputcapture/MyOutputCaptureTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.utilities.outputcapture; +package org.springframework.boot.docs.testing.utilities.outputcapture; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/utilities/testpropertyvalues/MyEnvironmentTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/utilities/testpropertyvalues/MyEnvironmentTests.java similarity index 88% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/utilities/testpropertyvalues/MyEnvironmentTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/utilities/testpropertyvalues/MyEnvironmentTests.java index c40bd3addb..e772c7ea0c 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/utilities/testpropertyvalues/MyEnvironmentTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/utilities/testpropertyvalues/MyEnvironmentTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.utilities.testpropertyvalues; +package org.springframework.boot.docs.testing.utilities.testpropertyvalues; import org.junit.jupiter.api.Test; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/utilities/testresttemplate/MySpringBootTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/utilities/testresttemplate/MySpringBootTests.java similarity index 92% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/utilities/testresttemplate/MySpringBootTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/utilities/testresttemplate/MySpringBootTests.java index 77847fdf40..6a3403385d 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/utilities/testresttemplate/MySpringBootTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/utilities/testresttemplate/MySpringBootTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.utilities.testresttemplate; +package org.springframework.boot.docs.testing.utilities.testresttemplate; import java.time.Duration; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/utilities/testresttemplate/MySpringBootTestsConfiguration.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/utilities/testresttemplate/MySpringBootTestsConfiguration.java similarity index 95% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/utilities/testresttemplate/MySpringBootTestsConfiguration.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/utilities/testresttemplate/MySpringBootTestsConfiguration.java index b9de7e86c5..6e88f20eeb 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/utilities/testresttemplate/MySpringBootTestsConfiguration.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/utilities/testresttemplate/MySpringBootTestsConfiguration.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.utilities.testresttemplate; +package org.springframework.boot.docs.testing.utilities.testresttemplate; import java.net.URI; diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/utilities/testresttemplate/MyTests.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/utilities/testresttemplate/MyTests.java similarity index 88% rename from spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/utilities/testresttemplate/MyTests.java rename to spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/utilities/testresttemplate/MyTests.java index c0c31d4307..d35829002e 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/features/testing/utilities/testresttemplate/MyTests.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/testing/utilities/testresttemplate/MyTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.utilities.testresttemplate; +package org.springframework.boot.docs.testing.utilities.testresttemplate; import org.junit.jupiter.api.Test; diff --git a/spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/features/testing/springbootapplications/jmx/MyJmxTestsTests.java b/spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/testing/springbootapplications/jmx/MyJmxTestsTests.java similarity index 83% rename from spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/features/testing/springbootapplications/jmx/MyJmxTestsTests.java rename to spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/testing/springbootapplications/jmx/MyJmxTestsTests.java index fb9e56d217..f779324ffd 100644 --- a/spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/features/testing/springbootapplications/jmx/MyJmxTestsTests.java +++ b/spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/testing/springbootapplications/jmx/MyJmxTestsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.springbootapplications.jmx; +package org.springframework.boot.docs.testing.springbootapplications.jmx; /** * Tests for SampleJmxTests diff --git a/spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/features/testing/utilities/outputcapture/MyOutputCaptureTestsTests.java b/spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/testing/utilities/outputcapture/MyOutputCaptureTestsTests.java similarity index 84% rename from spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/features/testing/utilities/outputcapture/MyOutputCaptureTestsTests.java rename to spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/testing/utilities/outputcapture/MyOutputCaptureTestsTests.java index d7f587b283..1d004714a2 100644 --- a/spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/features/testing/utilities/outputcapture/MyOutputCaptureTestsTests.java +++ b/spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/testing/utilities/outputcapture/MyOutputCaptureTestsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.utilities.outputcapture; +package org.springframework.boot.docs.testing.utilities.outputcapture; /** * Tests for {@link MyOutputCaptureTests}. diff --git a/spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/features/testing/utilities/testresttemplate/MySpringBootTestsTests.java b/spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/testing/utilities/testresttemplate/MySpringBootTestsTests.java similarity index 83% rename from spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/features/testing/utilities/testresttemplate/MySpringBootTestsTests.java rename to spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/testing/utilities/testresttemplate/MySpringBootTestsTests.java index d91bc5fb7e..e463e5aa64 100644 --- a/spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/features/testing/utilities/testresttemplate/MySpringBootTestsTests.java +++ b/spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/testing/utilities/testresttemplate/MySpringBootTestsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.docs.features.testing.utilities.testresttemplate; +package org.springframework.boot.docs.testing.utilities.testresttemplate; /** * Tests for {@link MySpringBootTests}.