You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2010/03/26 09:09:45 UTC
svn commit: r927724 -
/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsoluteRootPathDefaultMoveTest.java
Author: davsclaus
Date: Fri Mar 26 08:09:44 2010
New Revision: 927724
URL: http://svn.apache.org/viewvc?rev=927724&view=rev
Log:
CAMEL-2578: Polished test
Modified:
camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsoluteRootPathDefaultMoveTest.java
Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsoluteRootPathDefaultMoveTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsoluteRootPathDefaultMoveTest.java?rev=927724&r1=927723&r2=927724&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsoluteRootPathDefaultMoveTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsoluteRootPathDefaultMoveTest.java Fri Mar 26 08:09:44 2010
@@ -26,14 +26,7 @@ import org.apache.camel.component.mock.M
*/
public class FileConsumerAbsoluteRootPathDefaultMoveTest extends ContextTestSupport {
- private String base;
-
- @Override
- protected void setUp() throws Exception {
- base = "/temp";
- deleteDirectory(base);
- super.setUp();
- }
+ private String base = "/tmp/mytemp";
public void testDummy() {
// noop
@@ -41,6 +34,10 @@ public class FileConsumerAbsoluteRootPat
// TODO: Enable to test locally
public void xxxTestConsumeFromAbsolutePath() throws Exception {
+ deleteDirectory(base);
+
+ context.startRoute("foo");
+
MockEndpoint mock = getMockEndpoint("mock:report");
mock.expectedBodiesReceived("Hello Paris");
mock.expectedFileExists(base + "/.camel/paris.txt");
@@ -53,7 +50,8 @@ public class FileConsumerAbsoluteRootPat
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
public void configure() throws Exception {
- from("file:" + base).convertBodyTo(String.class).to("mock:report");
+ from("file:" + base).routeId("foo").noAutoStartup()
+ .convertBodyTo(String.class).to("mock:report");
}
};
}