mirror of
https://github.com/apache/struts.git
synced 2026-08-31 19:35:40 +00:00
WW-5304 Drops deprecated methods and fields in ActionContext
This commit is contained in:
+2
-2
@@ -58,7 +58,7 @@ public class ContentTypeHandlerManagerTest extends TestCase {
|
||||
mockResponse = new MockHttpServletResponse();
|
||||
mockRequest = new MockHttpServletRequest();
|
||||
mockRequest.setMethod("GET");
|
||||
ActionContext actionContext = ActionContext.of(new HashMap<>()).bind();
|
||||
ActionContext actionContext = ActionContext.of().bind();
|
||||
actionContext.withServletRequest(mockRequest);
|
||||
actionContext.withServletResponse(mockResponse);
|
||||
|
||||
@@ -135,7 +135,7 @@ public class ContentTypeHandlerManagerTest extends TestCase {
|
||||
C.eq(ContentTypeHandlerManager.STRUTS_REST_HANDLER_OVERRIDE_PREFIX+"xml")), "xmlOverride");
|
||||
mockContainer.expectAndReturn("getInstance", C.args(C.eq(String.class),
|
||||
C.eq(ContentTypeHandlerManager.STRUTS_REST_HANDLER_OVERRIDE_PREFIX+"json")), null);
|
||||
|
||||
|
||||
DefaultContentTypeHandlerManager mgr = new DefaultContentTypeHandlerManager();
|
||||
mgr.setContainer((Container) mockContainer.proxy());
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ public class RestWorkflowInterceptorTest extends TestCase {
|
||||
}, null);
|
||||
wf.setContentTypeHandlerManager((ContentTypeHandlerManager) mockContentTypeHandlerManager.proxy());
|
||||
|
||||
ActionContext.of(new HashMap<>())
|
||||
ActionContext.of()
|
||||
.withActionMapping(new ActionMapping())
|
||||
.bind();
|
||||
|
||||
|
||||
+2
-2
@@ -51,7 +51,7 @@ public class JuneauXmlHandlerTest extends XWorkTestCase {
|
||||
"</object>";
|
||||
handler = new JuneauXmlHandler();
|
||||
ai = new MockActionInvocation();
|
||||
ActionContext context = ActionContext.of(new HashMap<>()).withLocale(Locale.US);
|
||||
ActionContext context = ActionContext.of().withLocale(Locale.US);
|
||||
((MockActionInvocation) ai).setInvocationContext(context);
|
||||
}
|
||||
|
||||
@@ -95,4 +95,4 @@ public class JuneauXmlHandlerTest extends XWorkTestCase {
|
||||
.containsExactly("Adam", "Ewa");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ public class XStreamHandlerTest extends XWorkTestCase {
|
||||
handler = new XStreamHandler();
|
||||
ai = new MockActionInvocation();
|
||||
ActionSupport action = new ActionSupport();
|
||||
ActionContext context = ActionContext.of(new HashMap<>()).withLocale(Locale.US);
|
||||
ActionContext context = ActionContext.of().withLocale(Locale.US);
|
||||
ai.setInvocationContext(context);
|
||||
ai.setAction(action);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user