Examples of StubViewFactory


Examples of org.springframework.webflow.engine.StubViewFactory

    requestContext.getRootFlow().setApplicationContext(applicationContext);

    Model model = new Model();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null,
        this.codesResolver, null);
    ViewState state1 = new ViewState(requestContext.getRootFlow(), "state2", new StubViewFactory());
    requestContext.setCurrentState(state1);
    helper.validate();
    assertFalse(validator.state1Invoked);
    assertTrue(validator.fallbackInvoked);
  }
View Full Code Here

Examples of org.springframework.webflow.engine.StubViewFactory

    }
  }

  public void testResumeFlowExecutionException() {
    Flow flow = new Flow("flow");
    ViewState state = new ViewState(flow, "view", new StubViewFactory()) {
      public void resume(RequestControlContext context) {
        throw new FlowExecutionException("flow", "view", "oops");
      }
    };
    MockFlowExecutionListener mockListener = new MockFlowExecutionListener();
View Full Code Here

Examples of org.springframework.webflow.engine.StubViewFactory

    requestContext.getRootFlow().setApplicationContext(applicationContext);

    ExtendedModel model = new ExtendedModel();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null,
        this.codesResolver, null);
    ViewState state1 = new ViewState(requestContext.getRootFlow(), "state2", new StubViewFactory());
    requestContext.setCurrentState(state1);
    helper.validate();
    assertFalse(validator.state1Invoked);
    assertTrue(validator.fallbackInvoked);
  }
View Full Code Here

Examples of org.springframework.webflow.engine.StubViewFactory

    }
  }

  public void testExecuteTransition() {
    Flow flow = new Flow("flow");
    ViewState state = new ViewState(flow, "view", new StubViewFactory()) {
      public void resume(RequestControlContext context) {
        context.execute(getRequiredTransition(context));
      }
    };
    state.getTransitionSet().add(new Transition(new DefaultTargetStateResolver("finish")));
View Full Code Here

Examples of org.springframework.webflow.engine.StubViewFactory

    requestContext.getRootFlow().setApplicationContext(applicationContext);

    Model model = new Model();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null,
        this.codesResolver, null);
    ViewState state1 = new ViewState(requestContext.getRootFlow(), "state1", new StubViewFactory());
    requestContext.setCurrentState(state1);
    helper.validate();
    assertTrue(validator.state1Invoked);
    assertTrue(validator.fallbackInvoked);
  }
View Full Code Here

Examples of org.springframework.webflow.engine.StubViewFactory

    requestContext.getRootFlow().setApplicationContext(applicationContext);

    ExtendedModel model = new ExtendedModel();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null,
        this.codesResolver, null);
    ViewState state1 = new ViewState(requestContext.getRootFlow(), "state1", new StubViewFactory());
    requestContext.setCurrentState(state1);
    helper.validate();
    assertTrue(validator.state1Invoked);
    assertTrue(validator.fallbackInvoked);
  }
View Full Code Here

Examples of org.springframework.webflow.engine.StubViewFactory

    assertEquals(1, mockListener.getTransitionExecutingCount());
  }

  public void testRequestContextManagedOnStartAndResume() {
    Flow flow = new Flow("flow");
    new ViewState(flow, "view", new StubViewFactory()) {
      public void resume(RequestControlContext context) {
        assertSame(context, RequestContextHolder.getRequestContext());
      }
    };
    FlowExecutionImpl execution = new FlowExecutionImpl(flow);
View Full Code Here

Examples of org.springframework.webflow.engine.StubViewFactory

    requestContext.getRootFlow().setApplicationContext(applicationContext);

    Model model = new Model();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null,
        this.codesResolver, null);
    ViewState state1 = new ViewState(requestContext.getRootFlow(), "state2", new StubViewFactory());
    requestContext.setCurrentState(state1);
    helper.validate();
    assertFalse(validator.state1Invoked);
    assertTrue(validator.fallbackInvoked);
  }
View Full Code Here

Examples of org.springframework.webflow.engine.StubViewFactory

    requestContext.getRootFlow().setApplicationContext(applicationContext);

    Model model = new Model();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null,
        this.codesResolver, null);
    ViewState state1 = new ViewState(requestContext.getRootFlow(), "state1", new StubViewFactory());
    requestContext.setCurrentState(state1);
    helper.validate();
    assertTrue(validator.state1Invoked);
    assertTrue(validator.fallbackInvoked);
  }
View Full Code Here

Examples of org.springframework.webflow.engine.StubViewFactory

    requestContext.getRootFlow().setApplicationContext(applicationContext);

    ExtendedModel model = new ExtendedModel();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null,
        this.codesResolver, null);
    ViewState state1 = new ViewState(requestContext.getRootFlow(), "state1", new StubViewFactory());
    requestContext.setCurrentState(state1);
    helper.validate();
    assertTrue(validator.state1Invoked);
    assertTrue(validator.fallbackInvoked);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.