/** * Creates a new mock flow service locator. */ public MockFlowBuilderContext(String flowId, AttributeMap<Object> attributes) { super(flowId, attributes, new FlowDefinitionRegistryImpl(), TestFlowBuilderServicesFactory.getServices()); }
/** * Create the flow definition registry to be populated in {@link #doPopulate(FlowDefinitionRegistry)}. Subclasses * can override this method if they want to use a custom flow definition registry implementation. */ protected FlowDefinitionRegistry createFlowDefinitionRegistry() { return new FlowDefinitionRegistryImpl(); }
/** * Creates a new mock flow service locator. */ public MockFlowBuilderContext(String flowId, AttributeMap<Object> attributes) { super(flowId, attributes, new FlowDefinitionRegistryImpl(), TestFlowBuilderServicesFactory.getServices()); }
/** * Creates a new mock flow service locator. */ public MockFlowBuilderContext(String flowId, AttributeMap attributes) { super(flowId, attributes, new FlowDefinitionRegistryImpl(), TestFlowBuilderServicesFactory.getServices()); }
/** * Creates a new mock flow service locator. */ public MockFlowServiceLocator() { super(new FlowDefinitionRegistryImpl(), new StaticListableBeanFactory()); }
public void setUp() { FlowDefinitionRegistryImpl registry = new FlowDefinitionRegistryImpl(); registry.registerFlowDefinition(new FlowDefinitionImpl()); registry.registerFlowDefinition(new FlowDefinitionImpl("foo/flow2")); StaticWebApplicationContext context = new StaticWebApplicationContext(); context.getBeanFactory().registerSingleton("foo/flow2", new CustomFlowHandler()); mapping.setFlowRegistry(registry); mapping.setServletContext(new MockServletContext()); mapping.setApplicationContext(context); }
public void testParentHierarchy() { testRegisterMultipleFlows(); FlowDefinitionRegistryImpl child = new FlowDefinitionRegistryImpl(); child.setParent(registry); FooFlow fooFlow = new FooFlow(); child.registerFlowDefinition(new StaticFlowDefinitionHolder(fooFlow)); assertTrue(child.containsFlowDefinition("foo")); assertTrue(child.containsFlowDefinition("bar")); assertSame(fooFlow, child.getFlowDefinition("foo")); assertEquals(barFlow, child.getFlowDefinition("bar")); }