WW-5304 Drops deprecated methods and fields in ActionContext

This commit is contained in:
Lukasz Lenart
2023-04-09 16:00:03 +02:00
parent 7f3c1c2944
commit f0f9e42fa9
82 changed files with 417 additions and 562 deletions
@@ -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();
@@ -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);
}