I am writing tests for camel in spring boot project, i want to exclude all the routes except the one that i want to test.
So below i want to test the "ftp-poller", i have split the routes into seperate files, but it still loads all the routes, i dont understand is it possible to only load one route or is it becuase they are linked its not possible
@Component
public class FTPRoute extends RouteBuilder {
XmlJsonDataFormat xmlJsonFormat = new XmlJsonDataFormat();
@Override
public void configure() throws Exception {
from("{{endpoint.ftp.server}}")
.id("ftp-poller")
.log("Found file ${file:name}.")
.to("{{endpoint.ftp2.server}}");
from("{{endpoint.ftp2.server}}")
.id("ftp-poller")
.log("Found file ${file:name}.")
.to("{{endpoint.local.validation}}");
}
}
@RunWith(CamelSpringBootRunner.class)
@SpringBootTest(classes = {intTest.class},
properties = { "camel.springboot.java-routes-include-pattern=**/FTPRoute*"})
public class FTPRouteTest {
@Autowired
protected ProducerTemplate producerTemplate;
@EndpointInject(uri = "{{endpoint.requestbin}}")
protected MockEndpoint requestbinEndpoint;
@EndpointInject(uri = "{{endpoint.local.error}}")
protected MockEndpoint localErrorEndpoint;
@Before
public void cleanDir() throws Exception {
deleteDirectory("hb");
}
}