hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rola...@apache.org
Subject svn commit: r569833 - /jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/message/TestNameValuePair.java
Date Sun, 26 Aug 2007 16:23:42 GMT
Author: rolandw
Date: Sun Aug 26 09:23:41 2007
New Revision: 569833

URL: http://svn.apache.org/viewvc?rev=569833&view=rev
Log:
removed out-commented test cases that were moved to a different class

Modified:
    jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/message/TestNameValuePair.java

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/message/TestNameValuePair.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/message/TestNameValuePair.java?rev=569833&r1=569832&r2=569833&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/message/TestNameValuePair.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/message/TestNameValuePair.java
Sun Aug 26 09:23:41 2007
@@ -100,69 +100,4 @@
         NameValuePair param2 = new BasicNameValuePair("name1", null);
         assertEquals("name1", param2.toString());
     }
-/*
-    public void testBasicFormatting() throws Exception {
-        NameValuePair param1 = new BasicNameValuePair("param", "regular_stuff"); 
-        NameValuePair param2 = new BasicNameValuePair("param", "this\\that"); 
-        NameValuePair param3 = new BasicNameValuePair("param", "this,that"); 
-        NameValuePair param4 = new BasicNameValuePair("param", "quote marks (\") must be
escaped"); 
-        NameValuePair param5 = new BasicNameValuePair("param", "back slash (\\) must be escaped
too"); 
-        NameValuePair param6 = new BasicNameValuePair("param", "values with\tblanks must
always be quoted"); 
-        NameValuePair param7 = new BasicNameValuePair("param", null); 
-        
-        assertEquals("param=regular_stuff", BasicNameValuePair.format(param1, false));
-        assertEquals("param=\"this\\\\that\"", BasicNameValuePair.format(param2, false));
-        assertEquals("param=\"this,that\"", BasicNameValuePair.format(param3, false));
-        assertEquals("param=\"quote marks (\\\") must be escaped\"", BasicNameValuePair.format(param4,
false));
-        assertEquals("param=\"back slash (\\\\) must be escaped too\"", BasicNameValuePair.format(param5,
false));
-        assertEquals("param=\"values with\tblanks must always be quoted\"", BasicNameValuePair.format(param6,
false));
-        assertEquals("param", BasicNameValuePair.format(param7, false));
-
-        assertEquals("param=\"regular_stuff\"", BasicNameValuePair.format(param1, true));
-        assertEquals("param=\"this\\\\that\"", BasicNameValuePair.format(param2, true));
-        assertEquals("param=\"this,that\"", BasicNameValuePair.format(param3, true));
-        assertEquals("param=\"quote marks (\\\") must be escaped\"", BasicNameValuePair.format(param4,
true));
-        assertEquals("param=\"back slash (\\\\) must be escaped too\"", BasicNameValuePair.format(param5,
true));
-        assertEquals("param=\"values with\tblanks must always be quoted\"", BasicNameValuePair.format(param6,
true));
-        assertEquals("param", BasicNameValuePair.format(param7, false));
-    }
-
-    public void testArrayFormatting() throws Exception {
-        NameValuePair param1 = new BasicNameValuePair("param", "regular_stuff"); 
-        NameValuePair param2 = new BasicNameValuePair("param", "this\\that"); 
-        NameValuePair param3 = new BasicNameValuePair("param", "this,that");
-        NameValuePair[] params = new NameValuePair[] {param1, param2, param3}; 
-        assertEquals("param=regular_stuff; param=\"this\\\\that\"; param=\"this,that\"",

-                BasicNameValuePair.formatAll(params, false));
-        assertEquals("param=\"regular_stuff\"; param=\"this\\\\that\"; param=\"this,that\"",

-                BasicNameValuePair.formatAll(params, true));
-    }
-    
-    public void testFormatInvalidInput() throws Exception {
-        try {
-            BasicNameValuePair.format(null, new BasicNameValuePair("param", "value"), true);
-            fail("IllegalArgumentException should habe been thrown");
-        } catch (IllegalArgumentException ex) {
-            // expected
-        }
-        try {
-            BasicNameValuePair.format(new CharArrayBuffer(10), (NameValuePair) null, true);
-            fail("IllegalArgumentException should habe been thrown");
-        } catch (IllegalArgumentException ex) {
-            // expected
-        }
-        try {
-            BasicNameValuePair.formatAll(null, new NameValuePair[] {new BasicNameValuePair("param",
"value")}, true);
-            fail("IllegalArgumentException should habe been thrown");
-        } catch (IllegalArgumentException ex) {
-            // expected
-        }
-        try {
-            BasicNameValuePair.formatAll(new CharArrayBuffer(10), (NameValuePair[]) null,
true);
-            fail("IllegalArgumentException should habe been thrown");
-        } catch (IllegalArgumentException ex) {
-            // expected
-        }
-    }
-*/    
 }



Mime
View raw message