Simplify test
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 17 May 2010 17:41:30 +0000 (17:41 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 17 May 2010 17:41:30 +0000 (17:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@945267 13f79535-47bb-0310-9956-ffa450edef68

test/org/apache/tomcat/util/http/TestBug49158.java

index 985d265..ddcc7e0 100644 (file)
@@ -50,11 +50,8 @@ public class TestBug49158 extends CookiesBaseTest {
         ByteChunk res = new ByteChunk(); 
         getUrl("http://localhost:" + getPort() + "/"+path, res, headers);
         List<String> cookieHeaders = headers.get("Set-Cookie");
-        int count = 0;
-        for (String cookieHeader : cookieHeaders) {
-            count++;
-        }
-        assertEquals("There should only be one Set-Cookie header in this test",1, count);
+        assertEquals("There should only be one Set-Cookie header in this test",
+                1, cookieHeaders.size());
     }
     
     public static void addServlets(Tomcat tomcat) {