Package org.springframework.webflow.engine

Examples of org.springframework.webflow.engine.Flow


  private boolean removeSnapshotCalled;

  private boolean removeAllSnapshotsCalled;

  public void setUp() {
    flowDefinition = new Flow("flow");
    new EndState(flowDefinition, "end");
  }
View Full Code Here


public class StaticFlowExecutionListenerLoaderTests extends TestCase {

  private FlowExecutionListenerLoader loader = StaticFlowExecutionListenerLoader.EMPTY_INSTANCE;

  public void testEmptyListenerArray() {
    assertEquals(0, loader.getListeners(new Flow("foo")).length);
    assertEquals(0, loader.getListeners(null).length);
  }
View Full Code Here

  public void testStaticListener() {
    final FlowExecutionListener listener1 = new FlowExecutionListenerAdapter() {
    };
    loader = new StaticFlowExecutionListenerLoader(listener1);
    assertEquals(listener1, loader.getListeners(new Flow("foo"))[0]);
  }
View Full Code Here

    };
    final FlowExecutionListener listener2 = new FlowExecutionListenerAdapter() {
    };

    loader = new StaticFlowExecutionListenerLoader(new FlowExecutionListener[] { listener1, listener2 });
    assertEquals(listener1, loader.getListeners(new Flow("foo"))[0]);
    assertEquals(listener2, loader.getListeners(new Flow("foo"))[1]);
  }
View Full Code Here

  public void testAddConditionalListener() {
    FlowExecutionListenerAdapter listener = new FlowExecutionListenerAdapter() {
    };
    loader.addListener(listener, criteriaFactory.allFlows());
    Flow flow = new Flow("foo");
    FlowExecutionListener[] listeners = loader.getListeners(flow);
    assertEquals(1, listeners.length);
    assertSame(listener, listeners[0]);
  }
View Full Code Here

    };
    FlowExecutionListenerAdapter listener2 = new FlowExecutionListenerAdapter() {
    };
    loader.addListener(listener, criteriaFactory.allFlows());
    loader.addListener(listener2, criteriaFactory.allFlows());
    Flow flow = new Flow("foo");
    FlowExecutionListener[] listeners = loader.getListeners(flow);
    assertEquals(2, listeners.length);
    assertSame(listener, listeners[0]);
    assertSame(listener2, listeners[1]);
  }
View Full Code Here

  public void testAddListenerButNoMatch() {
    FlowExecutionListenerAdapter listener = new FlowExecutionListenerAdapter() {
    };
    loader.addListener(listener, criteriaFactory.flow("bar"));
    Flow flow = new Flow("foo");
    FlowExecutionListener[] listeners = loader.getListeners(flow);
    assertEquals(0, listeners.length);
  }
View Full Code Here

  private FlowExecutionListenerCriteriaFactory factory = new FlowExecutionListenerCriteriaFactory();

  public void testAllFlows() {
    FlowExecutionListenerCriteria c = factory.allFlows();
    assertEquals(true, c.appliesTo(new Flow("foo")));
  }
View Full Code Here

    assertEquals(true, c.appliesTo(new Flow("foo")));
  }

  public void testFlowMatch() {
    FlowExecutionListenerCriteria c = factory.flow("foo");
    assertEquals(true, c.appliesTo(new Flow("foo")));
    assertEquals(false, c.appliesTo(new Flow("baz")));
  }
View Full Code Here

    assertEquals(false, c.appliesTo(new Flow("baz")));
  }

  public void testMultipleFlowMatch() {
    FlowExecutionListenerCriteria c = factory.flows(new String[] { "foo", "bar" });
    assertEquals(true, c.appliesTo(new Flow("foo")));
    assertEquals(true, c.appliesTo(new Flow("bar")));
    assertEquals(false, c.appliesTo(new Flow("baz")));
  }
View Full Code Here

TOP

Related Classes of org.springframework.webflow.engine.Flow

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.