What OS, JDK and Camel version are you using? On Mon, Apr 11, 2011 at 7:57 PM, jpalmer1026 <[email protected]> wrote: > Hi, > > One of my unit tests is failing and I'm not really sure why. In the code > below, it's failing on the third line of the test > (mockFtp.allMessages().body().contains("Pilot");). The > expectedBodiesReceived() method in line 4 is working as expected so I'm not > really sure why the allMessages() method is failing. The error message I'm > getting is: > > Assertion error at index 0 on mock mock://ftp with predicate: body contains > Pilot evaluated as: GenericFile[100.txt] contains Pilot on Exchange[100.txt] > > My code is as folows: > > @Test > public void testMovePilotFiles() throws Exception { > MockEndpoint mockFtp = getMockEndpoint(sterlingWomsFtpPath); > mockFtp.expectedMessageCount(2); > mockFtp.allMessages().body().contains("Pilot"); > mockFtp.expectedBodiesReceived("Pilot store 1 file contents", "Pilot > store 2 file contents"); > > template.sendBodyAndHeader("Pilot store 1 file contents", > Exchange.FILE_NAME, "100.txt"); > template.sendBodyAndHeader("Pilot store 2 file contents", > Exchange.FILE_NAME, "200.txt"); > > Thread.sleep(2000); > > assertMockEndpointsSatisfied(); > } > > Any suggestions? > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Unit-test-is-failing-tp4296494p4296494.html > Sent from the Camel - Users mailing list archive at Nabble.com. >
-- Claus Ibsen ----------------- FuseSource Email: [email protected] Web: http://fusesource.com CamelOne 2011: http://fusesource.com/camelone2011/ Twitter: davsclaus Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
