You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by ya...@apache.org on 2018/04/26 18:06:55 UTC
[struts] branch support-2-3 updated: revert 4db5cdc
This is an automated email from the ASF dual-hosted git repository.
yasserzamani pushed a commit to branch support-2-3
in repository https://gitbox.apache.org/repos/asf/struts.git
The following commit(s) were added to refs/heads/support-2-3 by this push:
new a746fc8 revert 4db5cdc
a746fc8 is described below
commit a746fc872acbe8d14057c56bcffda468be94a87e
Author: Yasser Zamani <ya...@apache.org>
AuthorDate: Thu Apr 26 22:36:30 2018 +0430
revert 4db5cdc
---
.../java/org/apache/struts2/dispatcher/ChartResultTest.java | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/plugins/jfreechart/src/test/java/org/apache/struts2/dispatcher/ChartResultTest.java b/plugins/jfreechart/src/test/java/org/apache/struts2/dispatcher/ChartResultTest.java
index dd760a0..13737db 100644
--- a/plugins/jfreechart/src/test/java/org/apache/struts2/dispatcher/ChartResultTest.java
+++ b/plugins/jfreechart/src/test/java/org/apache/struts2/dispatcher/ChartResultTest.java
@@ -33,7 +33,6 @@ import org.jfree.chart.ChartFactory;
import org.jfree.chart.JFreeChart;
import org.jfree.data.general.DefaultPieDataset;
-import javax.imageio.ImageIO;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@@ -54,7 +53,7 @@ public class ChartResultTest extends StrutsTestCase {
public void testChart() throws Exception {
EasyMock.expect(responseMock.getOutputStream()).andReturn(os);
EasyMock.replay(responseMock, mockActionProxy, actionInvocation);
-
+
ChartResult result = new ChartResult();
result.setChart(mockChart);
@@ -66,7 +65,7 @@ public class ChartResultTest extends StrutsTestCase {
EasyMock.verify(responseMock);
assertTrue(os.isWritten());
}
-
+
public void testContentTypePng() throws Exception {
EasyMock.expect(responseMock.getOutputStream()).andReturn(os);
responseMock.setContentType("image/png");
@@ -83,7 +82,7 @@ public class ChartResultTest extends StrutsTestCase {
EasyMock.verify(responseMock);
assertTrue(os.isWritten());
}
-
+
public void testContentTypeJpg() throws Exception {
EasyMock.expect(responseMock.getOutputStream()).andReturn(os);
responseMock.setContentType("image/jpg");
@@ -98,9 +97,7 @@ public class ChartResultTest extends StrutsTestCase {
result.execute(actionInvocation);
EasyMock.verify(responseMock);
-
- boolean envSupportsJpeg = ImageIO.getImageWritersByFormatName("jpeg").hasNext();
- assertTrue(envSupportsJpeg ^ !os.isWritten());
+ assertTrue(os.isWritten());
}
--
To stop receiving notification emails like this one, please contact
yasserzamani@apache.org.