@Test public void testPerformBlockingInteractionRedirect() throws Exception { V1PerformBlockingInteraction performBlockingInteraction = createDefaultPerformBlockingInteraction(getDefaultHandle()); V1InteractionParams interactionParams = performBlockingInteraction.getInteractionParams(); // crappy way but this is a test! ;) V1NamedString namedString = new V1NamedString(); namedString.setName("symbol"); namedString.setValue("HELP"); interactionParams.getFormParameters().add(namedString); V1BlockingInteractionResponse response = producer.performBlockingInteraction(performBlockingInteraction); ExtendedAssert.assertNotNull(response); // this is a redirect... String redirectURL = response.getRedirectURL(); ExtendedAssert.assertNotNull(redirectURL); ExtendedAssert.assertEquals( "/WEB-INF/jsp/help.jsp", redirectURL); // fix-me: handle URL re-writing // no update response V1UpdateResponse updateResponse = response.getUpdateResponse(); ExtendedAssert.assertNull(updateResponse); }
private V1NamedString createNamedString(String name, String value) { V1NamedString namedString = new V1NamedString(); namedString.setName(name); namedString.setValue(value); return namedString; }