This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
The following commit(s) were added to refs/heads/main by this push:
new a5dc220c30c camel-test-spring was removed in camel 4 (#908)
a5dc220c30c is described below
commit a5dc220c30c39e4f97fc050dc78199a33bea48e2
Author: Federico Mariani <[email protected]>
AuthorDate: Fri Aug 11 11:21:01 2023 +0200
camel-test-spring was removed in camel 4 (#908)
---
.../src/main/docs/spring-boot.adoc | 52 ----------------------
tooling/camel-spring-boot-bom/pom.xml | 5 ---
.../camel/springboot/maven/BomGeneratorMojo.java | 5 ---
3 files changed, 62 deletions(-)
diff --git a/core/camel-spring-boot/src/main/docs/spring-boot.adoc
b/core/camel-spring-boot/src/main/docs/spring-boot.adoc
index 8af85a735b1..25c527237f2 100644
--- a/core/camel-spring-boot/src/main/docs/spring-boot.adoc
+++ b/core/camel-spring-boot/src/main/docs/spring-boot.adoc
@@ -351,58 +351,6 @@ The XML files should be Camel XML routes (*not*
`<CamelContext>`) such as
</routes>
----
-== Testing the JUnit 4 way (deprecated)
-
-For testing, Maven users will need to add the following dependencies to their
`pom.xml`:
-
-[source,xml]
-----
-<dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-test</artifactId>
- <version>${spring-boot.version}</version> <!-- Use the same version as
your Spring Boot version -->
- <scope>test</scope>
-</dependency>
-<dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-test-spring</artifactId>
- <version>${camel.version}</version> <!-- use the same version as your
Camel core version -->
- <scope>test</scope>
-</dependency>
-----
-
-To test a Camel Spring Boot application, annotate your test class(es) with
-`@RunWith(CamelSpringBootRunner.class)`. This brings Camel's Spring Test
-support to your application, so that you can write tests using
-https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-testing.html[Spring
Boot test conventions].
-
-To get the `CamelContext` or `ProducerTemplate`, you can inject them into the
class in the normal Spring manner, using `@Autowired`.
-
-You can also use
xref:components:others:test-spring-junit5.adoc[camel-test-spring-junit5] to
configure tests declaratively. This example uses the `@MockEndpoints`
annotation to auto-mock an endpoint:
-
-[source,java]
-----
-@RunWith(CamelSpringBootRunner.class)
-@SpringBootTest
-@MockEndpoints("direct:end")
-public class MyApplicationTest {
-
- @Autowired
- private ProducerTemplate template;
-
- @EndpointInject("mock:direct:end")
- MockEndpoint mock;
-
- @Test
- public void testReceive() throws Exception {
- mock.expectedBodiesReceived("Hello");
- template.sendBody("direct:start", "Hello");
- mock.assertIsSatisfied();
- }
-
-}
-----
-
== Testing the JUnit 5 way
For testing, Maven users will need to add the following dependencies to their
`pom.xml`:
diff --git a/tooling/camel-spring-boot-bom/pom.xml
b/tooling/camel-spring-boot-bom/pom.xml
index e0c4a139117..34e60f1ca44 100644
--- a/tooling/camel-spring-boot-bom/pom.xml
+++ b/tooling/camel-spring-boot-bom/pom.xml
@@ -1728,11 +1728,6 @@
<artifactId>camel-zookeeper-starter</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-test-spring</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test-spring-junit5</artifactId>
diff --git
a/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/BomGeneratorMojo.java
b/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/BomGeneratorMojo.java
index 950f9f0d26c..3214c781db7 100644
---
a/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/BomGeneratorMojo.java
+++
b/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/BomGeneratorMojo.java
@@ -215,11 +215,6 @@ public class BomGeneratorMojo extends AbstractMojo {
// include some dependencies for testing and management
dep = new Dependency();
dep.setGroupId("org.apache.camel");
- dep.setArtifactId("camel-test-spring");
- dep.setVersion("${project.version}");
- outDependencies.add(dep);
- dep = new Dependency();
- dep.setGroupId("org.apache.camel");
dep.setArtifactId("camel-test-spring-junit5");
dep.setVersion("${project.version}");
outDependencies.add(dep);