Author: davsclaus
Date: Fri Feb  6 11:13:44 2009
New Revision: 741533

URL: http://svn.apache.org/viewvc?rev=741533&view=rev
Log:
CAMEL-1319: Added includeNameXX options to the file component.

Added:
    
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerIncludeNameTest.java
   (contents, props changed)
      - copied, changed from r741417, 
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerExcludeNameTest.java
Modified:
    
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerExcludeNameTest.java

Modified: 
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerExcludeNameTest.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerExcludeNameTest.java?rev=741533&r1=741532&r2=741533&view=diff
==============================================================================
--- 
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerExcludeNameTest.java
 (original)
+++ 
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerExcludeNameTest.java
 Fri Feb  6 11:13:44 2009
@@ -26,7 +26,7 @@
 
     private String getFtpUrl() {
         return "ftp://ad...@localhost:"; + getPort() + 
"/excludename?password=admin"
-                + "&excludedNamePrefix=secret&excludedNamePostfix=xml";
+                + "&excludeNamePrefix=secret&excludeNamePostfix=xml";
     }
 
     @Override

Copied: 
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerIncludeNameTest.java
 (from r741417, 
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerExcludeNameTest.java)
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerIncludeNameTest.java?p2=camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerIncludeNameTest.java&p1=camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerExcludeNameTest.java&r1=741417&r2=741533&rev=741533&view=diff
==============================================================================
--- 
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerExcludeNameTest.java
 (original)
+++ 
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerIncludeNameTest.java
 Fri Feb  6 11:13:44 2009
@@ -20,13 +20,13 @@
 import org.apache.camel.component.mock.MockEndpoint;
 
 /**
- * Unit test that ftp consumer will exclude pre and postfixes
+ * Unit test that ftp consumer will include pre and postfixes
  */
-public class FtpConsumerExcludeNameTest extends FtpServerTestSupport {
+public class FtpConsumerIncludeNameTest extends FtpServerTestSupport {
 
     private String getFtpUrl() {
-        return "ftp://ad...@localhost:"; + getPort() + 
"/excludename?password=admin"
-                + "&excludedNamePrefix=secret&excludedNamePostfix=xml";
+        return "ftp://ad...@localhost:"; + getPort() + 
"/includename?password=admin"
+                + "&includeNamePrefix=report&excludeNamePostfix=xml";
     }
 
     @Override
@@ -35,20 +35,20 @@
         prepareFtpServer();
     }
 
-    public void testExludePreAndPostfixes() throws Exception {
+    public void testIncludeAndExludePreAndPostfixes() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");
-        mock.expectedMessageCount(2);
-        mock.expectedBodiesReceived("Reports", "Reports");
+        mock.expectedMessageCount(1);
+        mock.expectedBodiesReceived("Report 1");
         mock.assertIsSatisfied();
     }
 
     private void prepareFtpServer() throws Exception {
         // prepares the FTP Server by creating files on the server that we 
want to unit
-        // test that we can pool and store as a local file        
+        // test that we can pool and store as a local file
         sendFile(getFtpUrl(), "Hello World", "hello.xml");
-        sendFile(getFtpUrl(), "Reports", "report1.txt");
+        sendFile(getFtpUrl(), "Report 1", "report1.txt");
         sendFile(getFtpUrl(), "Bye World", "secret.txt");
-        sendFile(getFtpUrl(), "Reports", "report2.txt");
+        sendFile(getFtpUrl(), "Report 2", "report2.xml");
     }
 
     protected RouteBuilder createRouteBuilder() throws Exception {
@@ -59,4 +59,4 @@
         };
     }
 
-}
+}
\ No newline at end of file

Propchange: 
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerIncludeNameTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerIncludeNameTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerIncludeNameTest.java
------------------------------------------------------------------------------
    svn:mergeinfo = 


Reply via email to