camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1293578 - in /camel/trunk/camel-core/src/test/java/org/apache/camel/component/file: FilerConsumerDoneFileNameDeleteTest.java FilerConsumerDoneFileNameTest.java
Date Sat, 25 Feb 2012 11:34:22 GMT
Author: davsclaus
Date: Sat Feb 25 11:34:22 2012
New Revision: 1293578

URL: http://svn.apache.org/viewvc?rev=1293578&view=rev
Log:
Added test based on user forum issue

Added:
    camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameDeleteTest.java
      - copied, changed from r1293576, camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameTest.java
Modified:
    camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameTest.java

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameDeleteTest.java
(from r1293576, camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameDeleteTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameDeleteTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameTest.java&r1=1293576&r2=1293578&rev=1293578&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameDeleteTest.java
Sat Feb 25 11:34:22 2012
@@ -25,7 +25,7 @@ import org.apache.camel.builder.RouteBui
 /**
  * Unit test for writing done files
  */
-public class FilerConsumerDoneFileNameTest extends ContextTestSupport {
+public class FilerConsumerDoneFileNameDeleteTest extends ContextTestSupport {
 
     @Override
     protected void setUp() throws Exception {
@@ -56,6 +56,10 @@ public class FilerConsumerDoneFileNameTe
         // done file should be deleted now
         File file = new File("target/done/done").getAbsoluteFile();
         assertFalse("Done file should be deleted: " + file, file.exists());
+
+        // as well the original file should be deleted
+        file = new File("target/done/hello.txt").getAbsoluteFile();
+        assertFalse("Original file should be deleted: " + file, file.exists());
     }
 
     @Override
@@ -63,7 +67,7 @@ public class FilerConsumerDoneFileNameTe
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file:target/done?doneFileName=done&initialDelay=0&delay=10").to("mock:result");
+                from("file:target/done?doneFileName=done&delete=true&initialDelay=0&delay=10").to("mock:result");
             }
         };
     }

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameTest.java?rev=1293578&r1=1293577&r2=1293578&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameTest.java
Sat Feb 25 11:34:22 2012
@@ -56,6 +56,10 @@ public class FilerConsumerDoneFileNameTe
         // done file should be deleted now
         File file = new File("target/done/done").getAbsoluteFile();
         assertFalse("Done file should be deleted: " + file, file.exists());
+
+        // as well the original file should be moved to backup
+        file = new File("target/done/.camel/hello.txt").getAbsoluteFile();
+        assertTrue("Original file should be moved: " + file, file.exists());
     }
 
     @Override



Mime
View raw message