Author: bvahdat
Date: Tue Jan 22 20:54:11 2013
New Revision: 1437160

URL: http://svn.apache.org/viewvc?rev=1437160&view=rev
Log:
Get rid of the deprecated junit.framework.Assert API.

Modified:
    
camel/trunk/components/camel-hdfs/src/test/java/org/apache/camel/component/hdfs/HdfsProducerConsumerTest.java
    
camel/trunk/components/camel-hdfs/src/test/java/org/apache/camel/component/hdfs/HdfsProducerFileWriteTest.java

Modified: 
camel/trunk/components/camel-hdfs/src/test/java/org/apache/camel/component/hdfs/HdfsProducerConsumerTest.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-hdfs/src/test/java/org/apache/camel/component/hdfs/HdfsProducerConsumerTest.java?rev=1437160&r1=1437159&r2=1437160&view=diff
==============================================================================
--- 
camel/trunk/components/camel-hdfs/src/test/java/org/apache/camel/component/hdfs/HdfsProducerConsumerTest.java
 (original)
+++ 
camel/trunk/components/camel-hdfs/src/test/java/org/apache/camel/component/hdfs/HdfsProducerConsumerTest.java
 Tue Jan 22 20:54:11 2013
@@ -74,7 +74,7 @@ public class HdfsProducerConsumerTest ex
         int i = 0;
         List<Exchange> exchanges = resultEndpoint.getExchanges();
         for (Exchange exchange : exchanges) {
-            Assert.assertEquals("CIAO" + i++, 
exchange.getIn().getBody(String.class));
+            assertEquals("CIAO" + i++, exchange.getIn().getBody(String.class));
         }
     }
 

Modified: 
camel/trunk/components/camel-hdfs/src/test/java/org/apache/camel/component/hdfs/HdfsProducerFileWriteTest.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-hdfs/src/test/java/org/apache/camel/component/hdfs/HdfsProducerFileWriteTest.java?rev=1437160&r1=1437159&r2=1437160&view=diff
==============================================================================
--- 
camel/trunk/components/camel-hdfs/src/test/java/org/apache/camel/component/hdfs/HdfsProducerFileWriteTest.java
 (original)
+++ 
camel/trunk/components/camel-hdfs/src/test/java/org/apache/camel/component/hdfs/HdfsProducerFileWriteTest.java
 Tue Jan 22 20:54:11 2013
@@ -76,7 +76,7 @@ public class HdfsProducerFileWriteTest e
             template.sendBodyAndHeader("file://target/file-batch1/", "CIAO", 
"CamelFileName", "CIAO" + i);
         }
 
-        Assert.assertTrue("Timeout waiting for match" + nb.toString(), 
nb.matchesMockWaitTime());
+        assertTrue("Timeout waiting for match" + nb.toString(), 
nb.matchesMockWaitTime());
         context.stop();
 
         InputStream in = null;
@@ -84,7 +84,7 @@ public class HdfsProducerFileWriteTest e
             in = new URL("file:///" + file.toUri()).openStream();
             ByteArrayOutputStream bos = new ByteArrayOutputStream();
             IOUtils.copyBytes(in, bos, 4096, false);
-            Assert.assertEquals(40, bos.size());
+            assertEquals(40, bos.size());
         } finally {
             IOUtils.closeStream(in);
         }
@@ -115,7 +115,7 @@ public class HdfsProducerFileWriteTest e
             template.sendBodyAndHeader("file://target/file-batch2", "CIAO", 
"CamelFileName", "CIAO" + i);
         }
 
-        Assert.assertTrue("Timeout waiting for match" + nb.toString(), 
nb.matchesMockWaitTime());
+        assertTrue("Timeout waiting for match" + nb.toString(), 
nb.matchesMockWaitTime());
         context.stop();
 
         Configuration conf = new Configuration();
@@ -127,10 +127,10 @@ public class HdfsProducerFileWriteTest e
         int i = 0;
         while (reader.next(key, value)) {
             String str = new String(value.getBytes(), 0, value.getLength());
-            Assert.assertEquals("CIAO", str);
+            assertEquals("CIAO", str);
             i++;
         }
-        Assert.assertEquals(10, i);
+        assertEquals(10, i);
     }
 
     @Test
@@ -159,7 +159,7 @@ public class HdfsProducerFileWriteTest e
             template.sendBodyAndHeader("file://target/file-batch3", "CIAO", 
"CamelFileName", "CIAO" + i);
         }
 
-        Assert.assertTrue("Timeout waiting for match" + nb.toString(), 
nb.matchesMockWaitTime());
+        assertTrue("Timeout waiting for match" + nb.toString(), 
nb.matchesMockWaitTime());
         context.stop();
 
         Configuration conf = new Configuration();
@@ -171,11 +171,11 @@ public class HdfsProducerFileWriteTest e
         int i = 0;
         while (reader.next(key, value)) {
             String str = new String(value.getBytes(), 0, value.getLength());
-            Assert.assertEquals("CIAO", str);
-            Assert.assertEquals("CIAO" + i, key.toString());
+            assertEquals("CIAO", str);
+            assertEquals("CIAO" + i, key.toString());
             i++;
         }
-        Assert.assertEquals(10, i);
+        assertEquals(10, i);
     }
 
     @Test
@@ -204,7 +204,7 @@ public class HdfsProducerFileWriteTest e
             template.sendBodyAndHeader("file://target/file-batch4", "CIAO" + 
i, "CamelFileName", "CIAO" + i);
         }
 
-        Assert.assertTrue("Timeout waiting for match" + nb.toString(), 
nb.matchesMockWaitTime());
+        assertTrue("Timeout waiting for match" + nb.toString(), 
nb.matchesMockWaitTime());
         context.stop();
 
         Configuration conf = new Configuration();
@@ -216,8 +216,8 @@ public class HdfsProducerFileWriteTest e
             BytesWritable value = new BytesWritable();
             reader.get(key, value);
             String str = new String(value.getBytes(), 0, value.getLength());
-            Assert.assertEquals("CIAO" + i, str);
-            Assert.assertEquals("CIAO" + i, key.toString());
+            assertEquals("CIAO" + i, str);
+            assertEquals("CIAO" + i, key.toString());
         }
     }
 
@@ -251,7 +251,7 @@ public class HdfsProducerFileWriteTest e
             template.sendBodyAndHeader("file://target/file-batch5", bb, 
"CamelFileName", "CIAO" + i);
         }
 
-        Assert.assertTrue("Timeout waiting for match" + nb.toString(), 
nb.matchesMockWaitTime());
+        assertTrue("Timeout waiting for match" + nb.toString(), 
nb.matchesMockWaitTime());
         context.stop();
 
         Configuration conf = new Configuration();
@@ -262,10 +262,10 @@ public class HdfsProducerFileWriteTest e
         BytesWritable value = (BytesWritable) 
ReflectionUtils.newInstance(reader.getValueClass(), conf);
         int i = 0;
         while (reader.next(key, value)) {
-            Assert.assertEquals(value.getLength(), 8 * 1024 * 1024);
+            assertEquals(value.getLength(), 8 * 1024 * 1024);
             i++;
         }
-        Assert.assertEquals(1, i);
+        assertEquals(1, i);
     }
 
     @Override


Reply via email to