Package org.strecks.controller

Examples of org.strecks.controller.ActionCreator


{

  @Test
  public void testCreateAction() throws Exception
  {
    ActionCreator actionCreator = newMock(ActionCreator.class);
    CreateAction createAction = getCreateAction(actionCreator);
    ServletActionContext actionContext = getActionContext();
    ActionConfig actionConfig = newMock(ActionConfig.class);
    ModuleConfig moduleConfig = newMock(ModuleConfig.class);
    ActionServlet servlet = newMock(ActionServlet.class);
    Map applicationScope = newMock(Map.class);
    Map actions = new HashMap();
    Action action = new Action();
   
    expect(actionConfig.getModuleConfig()).andReturn(moduleConfig);
    expect(moduleConfig.getPrefix()).andReturn("prefix");
    expect(actionContext.getApplicationScope()).andReturn(applicationScope);
    expect(applicationScope.get("actionsprefix")).andReturn(actions);
    expect(actionCreator.createAction(String.class)).andReturn(action);
    expect(actionContext.getActionServlet()).andReturn(servlet);

    replayMocks();
    createAction.getAction(actionContext, "java.lang.String", actionConfig);
    verifyMocks();
View Full Code Here


  }

  @Test
  public void testCreationAction() throws Exception
  {
    ActionCreator actionCreator = new ActionCreatorImpl();
    Action action = actionCreator.createAction(NavigableFormRenderBean.class);
    NavigableFormController controller = (NavigableFormController) action;
    assert controller.getNavigationHolder() != null;
    assert controller.getBeanSource() != null;
  }
View Full Code Here

{

  @Test
  public void testCreationAction() throws Exception
  {
    ActionCreator actionCreator = new ActionCreatorImpl();
    Action action = actionCreator.createAction(SimpleDispatchAction.class);
    BasicDispatchController controller = (BasicDispatchController) action;
    assert controller.getBeanSource() != null;
  }
View Full Code Here

{

  @Test
  public void testCreationAction() throws Exception
  {
    ActionCreator actionCreator = new ActionCreatorImpl();
    Action action = actionCreator.createAction(SimpleLookupDispatchAction.class);
    BasicLookupDispatchController controller = (BasicLookupDispatchController) action;
    assert controller.internalGetKeyMethodMap() != null;
    assert controller.getBeanSource() != null;
  }
View Full Code Here

{

  @Test
  public void testCreationAction() throws Exception
  {
    ActionCreator actionCreator = new ActionCreatorImpl();
    Action action = actionCreator.createAction(SimpleFormAction.class);
    BasicFormController controller = (BasicFormController) action;
    assert controller.getBeanSource() != null;
  }
View Full Code Here

{

  @Test
  public void testCreationAction() throws Exception
  {
    ActionCreator actionCreator = new ActionCreatorImpl();
    Action action = actionCreator.createAction(ActionWithNoNavigate.class);
    BasicController controller = (BasicController) action;
    assert controller.getBeanSource() != null;
  }
View Full Code Here

{

  @Test
  public void testCreationAction() throws Exception
  {
    ActionCreator actionCreator = new ActionCreatorImpl();
    Action action = actionCreator.createAction(SimpleDispatchAction.class);
    BasicMappingDispatchController controller = (BasicMappingDispatchController) action;
    assert controller.getBeanSource() != null;
  }
View Full Code Here

{

  @Test
  public void testCreationAction() throws Exception
  {
    ActionCreator actionCreator = new ActionCreatorImpl();
    Action action = actionCreator.createAction(SimpleSubmitAction.class);
    BasicSubmitController controller = (BasicSubmitController) action;
    assert controller.getBeanSource() != null;
  }
View Full Code Here

{

  @Test
  public void testCreationAction() throws Exception
  {
    ActionCreator actionCreator = new ActionCreatorImpl();
    Action action = actionCreator.createAction(SimpleDispatchAction.class);
    NavigableMappingDispatchController controller = (NavigableMappingDispatchController) action;
    assert controller.getNavigationHolder() != null;
    assert controller.getBeanSource() != null;
  }
View Full Code Here

  }

  @Test
  public void testCreationAction() throws Exception
  {
    ActionCreator actionCreator = new ActionCreatorImpl();
    Action action = actionCreator.createAction(SimpleDispatchAction.class);
    NavigableDispatchController controller = (NavigableDispatchController) action;
    assert controller.getBeanSource() != null;
    assert controller.getNavigationHolder() != null;
  }
View Full Code Here

TOP

Related Classes of org.strecks.controller.ActionCreator

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.