Examples of StaticApplicationContext


Examples of org.springframework.context.support.StaticApplicationContext

    assertEquals(1, messages.getAllMessages().length);
    assertEquals(1, messages.getMessagesBySource("errors-external").length);
  }

  public void testValidateWithErrorsForBeanValidatorOverridden() {
    StaticApplicationContext applicationContext = new StaticApplicationContext();
    applicationContext.registerSingleton("modelValidator", StubModelErrorsOverridden.class);
    ((Flow) requestContext.getActiveFlow()).setApplicationContext(applicationContext);
    ValidationHelper helper = new ValidationHelper(new Object(), requestContext, eventId, modelName, null, null);
    helper.validate();
    MessageContext messages = requestContext.getMessageContext();
    assertEquals(1, messages.getAllMessages().length);
View Full Code Here

Examples of org.springframework.context.support.StaticApplicationContext

    assertTrue(model.fallbackInvoked);
  }

  public void testStateAndFallbackValidatorInvoked() {
    ModelValidator validator = new ModelValidator();
    StaticApplicationContext applicationContext = new StaticApplicationContext();
    applicationContext.getBeanFactory().registerSingleton("modelValidator", validator);
    requestContext.getRootFlow().setApplicationContext(applicationContext);

    Object model = new Object();
    ValidationHelper helper = new ValidationHelper(model, requestContext, eventId, modelName, null, null);
    ViewState state1 = new ViewState(requestContext.getRootFlow(), "state1", new StubViewFactory());
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.