Add some test codes for a resolved issue [WW-5100]

This commit is contained in:
powercomsmt
2021-11-12 01:11:24 +08:00
parent dd807e78a8
commit b96b048168
@@ -81,6 +81,7 @@ public class DispatcherTest extends StrutsInternalTestCase {
du.prepare(req, res);
assertEquals(req.getCharacterEncoding(), "utf-8");
assertEquals(res.getCharacterEncoding(), "utf-8");
}
public void testEncodingForXMLHttpRequest() throws Exception {
@@ -99,6 +100,7 @@ public class DispatcherTest extends StrutsInternalTestCase {
// then
assertEquals(req.getCharacterEncoding(), "UTF-8");
assertEquals(res.getCharacterEncoding(), "UTF-8");
}
public void testSetEncodingIfDiffer() throws Exception {
@@ -121,6 +123,7 @@ public class DispatcherTest extends StrutsInternalTestCase {
// then
assertEquals(req.getCharacterEncoding(), "utf-8");
assertEquals(res.getCharacterEncoding(), "utf-8");
mock.verify();
}
@@ -135,6 +138,7 @@ public class DispatcherTest extends StrutsInternalTestCase {
du.prepare(req, res);
assertEquals("utf-8", req.getCharacterEncoding());
assertEquals("utf-8", res.getCharacterEncoding());
}
public void testPrepareMultipartRequest() throws Exception {