camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject svn commit: r790314 - /camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/
Date Wed, 01 Jul 2009 19:07:23 GMT
Author: hadrian
Date: Wed Jul  1 19:07:22 2009
New Revision: 790314

URL: http://svn.apache.org/viewvc?rev=790314&view=rev
Log:
CAMEL-1078.  More cleanup.

Modified:
    camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginAndCommitExpressionRenameStrategyTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginAndCommitRenameStrategyTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginExpressionRenameStrategyTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginRenameStrategyTest.java

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginAndCommitExpressionRenameStrategyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginAndCommitExpressionRenameStrategyTest.java?rev=790314&r1=790313&r2=790314&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginAndCommitExpressionRenameStrategyTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginAndCommitExpressionRenameStrategyTest.java
Wed Jul  1 19:07:22 2009
@@ -66,8 +66,9 @@
                 from("file://target/reports?preMove=../inprogress/${file:name.noext}.bak&move=../done/${file:name}&consumer.delay=5000")
                         .process(new Processor() {
                             public void process(Exchange exchange) throws Exception {
-                                GenericFileExchange<File> fe = (GenericFileExchange<File>)
exchange;
-                                assertTrue(fe.getGenericFile().getRelativeFilePath().indexOf("inprogress")
> -1);
+                                GenericFile<File> file = (GenericFile<File>)
exchange.getProperty(FileComponent.FILE_EXCHANGE_FILE);
+                                assertNotNull(file);
+                                assertTrue(file.getRelativeFilePath().indexOf("inprogress")
> -1);
                             }
                         })
                         .to("mock:report");

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginAndCommitRenameStrategyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginAndCommitRenameStrategyTest.java?rev=790314&r1=790313&r2=790314&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginAndCommitRenameStrategyTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginAndCommitRenameStrategyTest.java
Wed Jul  1 19:07:22 2009
@@ -76,8 +76,9 @@
                 from("file://target/reports?preMove=../inprogress/${file:name}&move=../done/${file:name}&delay=5000")
                         .process(new Processor() {
                             public void process(Exchange exchange) throws Exception {
-                                GenericFileExchange<File> fe = (GenericFileExchange<File>)
exchange;
-                                assertTrue(fe.getGenericFile().getRelativeFilePath().indexOf("inprogress")
> -1);
+                                GenericFile<File> file = (GenericFile<File>)
exchange.getProperty(FileComponent.FILE_EXCHANGE_FILE);
+                                assertNotNull(file);
+                                assertTrue(file.getRelativeFilePath().indexOf("inprogress")
> -1);
                             }
                         })
                         .to("mock:report");

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginExpressionRenameStrategyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginExpressionRenameStrategyTest.java?rev=790314&r1=790313&r2=790314&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginExpressionRenameStrategyTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginExpressionRenameStrategyTest.java
Wed Jul  1 19:07:22 2009
@@ -75,8 +75,9 @@
                 from("file://target/reports?preMove=../inprogress/${file:name.noext}.bak&consumer.delay=5000")
                         .process(new Processor() {
                             public void process(Exchange exchange) throws Exception {
-                                GenericFileExchange<File> fe = (GenericFileExchange<File>)
exchange;
-                                assertTrue(fe.getGenericFile().getRelativeFilePath().indexOf("inprogress")
> -1);
+                                GenericFile<File> file = (GenericFile<File>)
exchange.getProperty(FileComponent.FILE_EXCHANGE_FILE);
+                                assertNotNull(file);
+                                assertTrue(file.getRelativeFilePath().indexOf("inprogress")
> -1);
                             }
                         })
                         .to("mock:report");

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginRenameStrategyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginRenameStrategyTest.java?rev=790314&r1=790313&r2=790314&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginRenameStrategyTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginRenameStrategyTest.java
Wed Jul  1 19:07:22 2009
@@ -73,8 +73,9 @@
                 from("file://target/reports?preMove=../inprogress/${file:name}&consumer.delay=5000")
                         .process(new Processor() {
                             public void process(Exchange exchange) throws Exception {
-                                GenericFileExchange<File> fe = (GenericFileExchange<File>)
exchange;
-                                assertTrue(fe.getGenericFile().getRelativeFilePath().indexOf("inprogress")
> -1);
+                                GenericFile<File> file = (GenericFile<File>)
exchange.getProperty(FileComponent.FILE_EXCHANGE_FILE);
+                                assertNotNull(file);
+                                assertTrue(file.getRelativeFilePath().indexOf("inprogress")
> -1);
                             }
                         })
                         .to("mock:report");



Mime
View raw message