You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by ni...@apache.org on 2007/11/23 15:41:32 UTC

svn commit: r597674 - /struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/StreamResultTest.java

Author: nilsga
Date: Fri Nov 23 06:41:32 2007
New Revision: 597674

URL: http://svn.apache.org/viewvc?rev=597674&view=rev
Log:
WW-2335 Using the computed value for content length instead of the hardcoded value, as it is done in the other test methods.

Modified:
    struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/StreamResultTest.java

Modified: struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/StreamResultTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/StreamResultTest.java?rev=597674&r1=597673&r2=597674&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/StreamResultTest.java (original)
+++ struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/StreamResultTest.java Fri Nov 23 06:41:32 2007
@@ -81,14 +81,14 @@
 
         result.doExecute("helloworld", mai);
 
-        assertEquals("1185", result.getContentLength());
+        assertEquals(String.valueOf(contentLength), result.getContentLength());
         assertEquals("text/plain", result.getContentType());
         assertEquals("streamForImage", result.getInputName());
         assertEquals(1024, result.getBufferSize()); // 1024 is default
         assertEquals("inline", result.getContentDisposition());
 
         assertEquals("text/plain", response.getContentType());
-        assertEquals(1185, response.getContentLength());
+        assertEquals(contentLength, response.getContentLength());
         assertEquals("inline", response.getHeader("Content-disposition"));
     }