Re: Configuring endpoint programmatically

2012-03-26 Thread Claus Ibsen
On Mon, Mar 26, 2012 at 2:23 PM, Borut Bolčina wrote: > It's the route that one is testing that matters. I added the noop option to: > > from("file:src/test/resources?noop=true") > This is a consumer which "pickup the files". And the noop option is only for the consumer. > and then in the test

Re: Configuring endpoint programmatically

2012-03-26 Thread Borut Bolčina
It's the route that one is testing that matters. I added the noop option to: from("file:src/test/resources?noop=true") and then in the test method it does not matter how one constructs the endpoint. So it boils down to: @Test public void testNumberOfWeatherStations() throws Exception { MockEndp

Re: Configuring endpoint programmatically

2012-03-26 Thread Borut Bolčina
It felt like a solution, but still fails. The file is moved one level lower to src/test/resources/.camel folder just like before. @Test public void testNumberOfWeatherStations() throws Exception { MockEndpoint mock = getMockEndpoint("mock:meteo1"); mock.expectedMessageCount(9); mock.setAssertPer

Re: Configuring endpoint programmatically

2012-03-26 Thread Claus Ibsen
Hi Just use the setters on the file endpoint FileEndpoint endpoint = ... endpoint.setNoop(true); On Mon, Mar 26, 2012 at 1:16 PM, Borut Bolčina wrote: > Hello again, > > The File component can be configured with some options, I am interested in > "noop=true". What can be done by: > > from("fil

Configuring endpoint programmatically

2012-03-26 Thread Borut Bolčina
Hello again, The File component can be configured with some options, I am interested in "noop=true". What can be done by: from("file:src/test/resources?fileName=myFile.xml&noop=true") is what I want to do it with code: String fileName = "src/test/resources/myFile.xml"; Endpoint endpoint = new F