Hi Quinn,
My test class looks like this. When i am trying to run i am getting error
message like- No bean "testProcessor" found in the registry.
public class FirstTest extends CamelSpringTestSupport{
@Override
protected AbstractApplicationContext createApplicationContext() {
return new ClassPathXmlApplicationContext("camel-context.xml");
}
@Override
public String isMockEndpoints() {
return "*";
}
@Override
public CamelContext createCamelContext() {
CamelContext context = new DefaultCamelContext();
ActiveMQConnectionFactory cf = new
ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
ActiveMQConfiguration config=new ActiveMQConfiguration();
config.setConnectionFactory(cf);
ActiveMQComponent activeMQComponent = new ActiveMQComponent();
activeMQComponent.setConfiguration(config);
context.addComponent("jms", activeMQComponent);
TestProcessor dp=new TestProcessor();
return context;
}
@Test
public void test() throws InterruptedException{
MockEndpoint mock = getMockEndpoint("mock:bean:testProcessor");
HashMap header=new HashMap<>();
header.put("token","ABCD");
template.setDefaultEndpointUri("bean:testPreProcessor");
template.sendBodyAndHeader("direct:test","Hello World",header);
assertMockEndpointsSatisfied();
}
}
--
View this message in context:
http://camel.465427.n5.nabble.com/mock-http-endpoint-and-retrieving-value-form-properties-file-tp5782604p5782727.html
Sent from the Camel - Users mailing list archive at Nabble.com.