public void assertRender(String expectedTarget, Map<String, String> expectedArguments) { assertRender(application.resolveBean(ControllerService.class).getDescriptor().getMethodById(expectedTarget).getHandle(), expectedArguments); }
public void assertRender(String expectedTarget, Map<String, String> expectedArguments) { assertRender(application.resolveBean(ControllerService.class).getDescriptor().getMethodById(expectedTarget).getHandle(), expectedArguments); }
@Test public void testRender() throws Exception { MockApplication<?> app = application("plugin.controller.action.render").init(); // MockClient client = app.client(); MockViewBridge render = client.render(); MockActionBridge action = (MockActionBridge)client.invoke(render.assertStringResponse()); action.assertRender("render", Collections.singletonMap("arg", "arg_value")); } }
@Test public void testRender() throws Exception { MockApplication<?> app = application("plugin.controller.action.render").init(); // MockClient client = app.client(); MockViewBridge render = client.render(); MockActionBridge action = (MockActionBridge)client.invoke(render.assertStringResponse()); action.assertRender("render", Collections.singletonMap("arg", "arg_value")); } }
@Test public void testUpdate() throws Exception { MockApplication<?> app = application("plugin.controller.view.update").init(); // MockClient client = app.client(); MockViewBridge render = client.render(); String result = render.assertStringResponse(); MockActionBridge action = (MockActionBridge)client.invoke(result); action.assertRender("A.done", Collections.<String, String>emptyMap()); } }
@Test public void testUpdate() throws Exception { MockApplication<?> app = application("plugin.controller.view.update").init(); // MockClient client = app.client(); MockViewBridge render = client.render(); String result = render.assertStringResponse(); MockActionBridge action = (MockActionBridge)client.invoke(result); action.assertRender("A.done", Collections.<String, String>emptyMap()); } }