jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1754659 - /jmeter/trunk/test/src/org/apache/jorphan/util/TestJorphanUtils.java
Date Sun, 31 Jul 2016 12:41:48 GMT
Author: pmouawad
Date: Sun Jul 31 12:41:48 2016
New Revision: 1754659

URL: http://svn.apache.org/viewvc?rev=1754659&view=rev
Log:
Fix inverted assertion parameters
Based on PR 217 contributed by Benoit Wiart (b.wiart at ubik-ingenierie.com)

Modified:
    jmeter/trunk/test/src/org/apache/jorphan/util/TestJorphanUtils.java

Modified: jmeter/trunk/test/src/org/apache/jorphan/util/TestJorphanUtils.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jorphan/util/TestJorphanUtils.java?rev=1754659&r1=1754658&r2=1754659&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jorphan/util/TestJorphanUtils.java (original)
+++ jmeter/trunk/test/src/org/apache/jorphan/util/TestJorphanUtils.java Sun Jul 31 12:41:48
2016
@@ -287,8 +287,7 @@ public class TestJorphanUtils {
 
     @Test
     public void testSplitSSSNone() {
-        String out[];
-        out = JOrphanUtils.split("", "," ,"x");
+        String[] out = JOrphanUtils.split("", "," ,"x");
         assertEquals(0, out.length);
 
         out = JOrphanUtils.split("a,;bc,;,", "","x");
@@ -298,14 +297,13 @@ public class TestJorphanUtils {
 
     @Test
     public void testreplaceAllChars(){
-        assertEquals(JOrphanUtils.replaceAllChars("",' ', "+"),"");
-        String in,out;
-        in="source";
-        assertEquals(JOrphanUtils.replaceAllChars(in,' ', "+"),in);
-        out="so+rce";
-        assertEquals(JOrphanUtils.replaceAllChars(in,'u', "+"),out);
-        in="A B  C "; out="A+B++C+";
-        assertEquals(JOrphanUtils.replaceAllChars(in,' ', "+"),out);
+        assertEquals("", JOrphanUtils.replaceAllChars("",' ', "+"));
+        assertEquals("source", JOrphanUtils.replaceAllChars("source",' ', "+"));
+        assertEquals("so+rce", JOrphanUtils.replaceAllChars("source",'u', "+"));
+        assertEquals("+so+urc+", JOrphanUtils.replaceAllChars("esoeurce",'e', "+"));
+        assertEquals("AZAZsoAZurcAZ", JOrphanUtils.replaceAllChars("eesoeurce",'e', "AZ"));
+        assertEquals("A+B++C+", JOrphanUtils.replaceAllChars("A B  C ",' ', "+"));
+        assertEquals("A%20B%20%20C%20", JOrphanUtils.replaceAllChars("A B  C ",' ', "%20"));
     }
     
     @Test



Mime
View raw message