camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r782581 - /camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpToFileNoFileNameHeaderTest.java
Date Mon, 08 Jun 2009 10:07:50 GMT
Author: davsclaus
Date: Mon Jun  8 10:07:49 2009
New Revision: 782581

URL: http://svn.apache.org/viewvc?rev=782581&view=rev
Log:
Fixed unit test failure on AIX reported by TC.

Modified:
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpToFileNoFileNameHeaderTest.java

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpToFileNoFileNameHeaderTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpToFileNoFileNameHeaderTest.java?rev=782581&r1=782580&r2=782581&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpToFileNoFileNameHeaderTest.java
(original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpToFileNoFileNameHeaderTest.java
Mon Jun  8 10:07:49 2009
@@ -16,8 +16,6 @@
  */
 package org.apache.camel.component.file.remote;
 
-import java.io.File;
-
 import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
 import org.apache.camel.Producer;
@@ -41,15 +39,12 @@
     }
 
     public void testCorrectFilename() throws Exception {
-        MockEndpoint resultEndpoint = getMockEndpoint("mock:result");
-        resultEndpoint.expectedMinimumMessageCount(1);
-        resultEndpoint.expectedBodiesReceived("Hello World from FTPServer");
-        resultEndpoint.assertIsSatisfied();
-
-        // assert the file
-        File file = new File("target/ftptest/hello.txt");
-        assertTrue("The file should exists", file.exists());
-        assertTrue("File size wrong", file.length() > 10);
+        MockEndpoint mock = getMockEndpoint("mock:result");
+        mock.expectedMinimumMessageCount(1);
+        mock.expectedBodiesReceived("Hello World from FTPServer");
+        mock.expectedFileExists("target/ftptest/hello.txt", "Hello World from FTPServer");
+
+        mock.assertIsSatisfied();
     }
 
     private void prepareFtpServer() throws Exception {



Mime
View raw message