fixed broken tests

This commit is contained in:
Keith Donald
2007-10-29 14:34:58 +00:00
parent dc01dd14d3
commit 143f5017f6
2 changed files with 6 additions and 1 deletions

View File

@@ -153,7 +153,7 @@ public class MockExternalContext implements ExternalContext {
}
public String buildFlowExecutionUrl(FlowExecutionRequestInfo requestInfo, boolean contextRelative) {
throw new UnsupportedOperationException("Not yet implemented");
return "/executions/" + requestInfo.getFlowDefinitionId() + "/" + requestInfo.getFlowExecutionKey();
}
public void sendFlowDefinitionRedirect(FlowDefinitionRequestInfo requestInfo) {

View File

@@ -25,6 +25,7 @@ import org.springframework.webflow.execution.Event;
import org.springframework.webflow.execution.View;
import org.springframework.webflow.execution.ViewFactory;
import org.springframework.webflow.test.MockExternalContext;
import org.springframework.webflow.test.MockFlowExecutionKey;
import org.springframework.webflow.test.MockRequestContext;
public class MvcViewFactoryTests extends TestCase {
@@ -56,6 +57,7 @@ public class MvcViewFactoryTests extends TestCase {
externalContext.setRequest(request);
externalContext.setResponse(response);
context.setExternalContext(externalContext);
context.getMockFlowExecutionContext().setKey(new MockFlowExecutionKey());
View view = viewFactory.getView(context);
assertEquals(false, view.eventSignaled());
view.render();
@@ -75,6 +77,7 @@ public class MvcViewFactoryTests extends TestCase {
externalContext.setRequest(request);
externalContext.setResponse(response);
context.setExternalContext(externalContext);
context.getMockFlowExecutionContext().setKey(new MockFlowExecutionKey());
View view = viewFactory.getView(context);
assertEquals(false, view.eventSignaled());
view.render();
@@ -102,6 +105,7 @@ public class MvcViewFactoryTests extends TestCase {
externalContext.setRequest(request);
externalContext.setResponse(response);
context.setExternalContext(externalContext);
context.getMockFlowExecutionContext().setKey(new MockFlowExecutionKey());
View view = viewFactory.getView(context);
assertEquals(true, view.eventSignaled());
Event e = view.getEvent();
@@ -132,6 +136,7 @@ public class MvcViewFactoryTests extends TestCase {
externalContext.setRequest(request);
externalContext.setResponse(response);
context.setExternalContext(externalContext);
context.getMockFlowExecutionContext().setKey(new MockFlowExecutionKey());
View view = viewFactory.getView(context);
assertEquals(true, view.eventSignaled());
Event e = view.getEvent();