camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject camel git commit: Poish the ZipFileDataFormatTest
Date Tue, 03 Mar 2015 04:16:47 GMT
Repository: camel
Updated Branches:
  refs/heads/master fa64f91a0 -> 8ac197b4f


Poish the ZipFileDataFormatTest


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/8ac197b4
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/8ac197b4
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/8ac197b4

Branch: refs/heads/master
Commit: 8ac197b4fca4b55cef48708229b21a400be97bb9
Parents: fa64f91
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Tue Mar 3 12:16:37 2015 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Tue Mar 3 12:16:37 2015 +0800

----------------------------------------------------------------------
 .../dataformat/zipfile/ZipFileDataFormatTest.java     | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/8ac197b4/components/camel-zipfile/src/test/java/org/apache/camel/dataformat/zipfile/ZipFileDataFormatTest.java
----------------------------------------------------------------------
diff --git a/components/camel-zipfile/src/test/java/org/apache/camel/dataformat/zipfile/ZipFileDataFormatTest.java
b/components/camel-zipfile/src/test/java/org/apache/camel/dataformat/zipfile/ZipFileDataFormatTest.java
index 889e480..4bcc6b1 100644
--- a/components/camel-zipfile/src/test/java/org/apache/camel/dataformat/zipfile/ZipFileDataFormatTest.java
+++ b/components/camel-zipfile/src/test/java/org/apache/camel/dataformat/zipfile/ZipFileDataFormatTest.java
@@ -117,12 +117,12 @@ public class ZipFileDataFormatTest extends CamelTestSupport {
         assertMockEndpointsSatisfied();
 
         // use builder to ensure the exchange is fully done before we check for file exists
-        assertTrue(notify.matches(5, TimeUnit.SECONDS));
+        assertTrue("The exchange is not done in time.", notify.matches(5, TimeUnit.SECONDS));
 
         Exchange exchange = mock.getReceivedExchanges().get(0);
         File file = new File(TEST_DIR, exchange.getIn().getMessageId() + ".zip");
-        assertTrue(file.exists());
-        assertTrue(ObjectHelper.equalByteArray(getZippedText(exchange.getIn().getMessageId()),
getBytes(file)));
+        assertTrue("The file should exist.", file.exists());
+        assertTrue("Get a wrong message content.", ObjectHelper.equalByteArray(getZippedText(exchange.getIn().getMessageId()),
getBytes(file)));
     }
 
     @Test
@@ -133,7 +133,7 @@ public class ZipFileDataFormatTest extends CamelTestSupport {
         mock.expectedMessageCount(1);
         
         File file = new File(TEST_DIR, "poem.txt.zip");
-        assertFalse(file.exists());
+        assertFalse("The zip should not exit.", file.exists());
 
         template.sendBodyAndHeader("direct:zipToFile", TEXT, FILE_NAME, "poem.txt");
 
@@ -141,10 +141,10 @@ public class ZipFileDataFormatTest extends CamelTestSupport {
         mock.assertIsSatisfied();
 
         // use builder to ensure the exchange is fully done before we check for file exists
-        assertTrue(notify.matches(5, TimeUnit.SECONDS));
+        assertTrue("The exchange is not done in time.", notify.matches(5, TimeUnit.SECONDS));
 
-        assertTrue(file.exists());
-        assertTrue(ObjectHelper.equalByteArray(getZippedText("poem.txt"), getBytes(file)));
+        assertTrue("The file should exist.", file.exists());
+        assertTrue("Get a wrong message content.", ObjectHelper.equalByteArray(getZippedText("poem.txt"),
getBytes(file)));
     }
 
     @Test


Mime
View raw message