Package org.apache.turbine.pipeline

Examples of org.apache.turbine.pipeline.DefaultPipelineData


   *
   * @throws Exception If something goes wrong with the unit test
   */
  public void testDoPerformBubblesException() throws Exception {
    RunData data = getRunData(request,response,config);
    PipelineData pipelineData = new DefaultPipelineData();
    Map runDataMap = new HashMap();
    runDataMap.put(RunData.class, data);
    pipelineData.put(RunData.class, runDataMap);
    data.setAction("VelocityActionThrowsException");
    try {
      ActionLoader.getInstance().exec(data, data.getAction());
      fail("Should have thrown an exception");
    } catch (Exception e) {
View Full Code Here


     */
  public void testActionEventBubblesException() throws Exception {
    // can't seem to figure out how to setup the Mock Request with the right parameters...
    request.setupAddParameter("eventSubmit_doCauseexception", "foo");
    RunData data = getRunData(request,response,config);
    PipelineData pipelineData = new DefaultPipelineData();
    Map runDataMap = new HashMap();
    runDataMap.put(RunData.class, data);
    pipelineData.put(RunData.class, runDataMap);
    data.setAction("VelocityActionThrowsException");
    data.getParameters().add("eventSubmit_doCauseexception", "foo");
    assertTrue(
      data.getParameters().containsKey("eventSubmit_doCauseexception"));
    try {
View Full Code Here

   */
  public void testDoPerformDoesntBubbleException() throws Exception {
    Turbine.getConfiguration().setProperty("action.event.bubbleexception",Boolean.FALSE);
    assertFalse(Turbine.getConfiguration().getBoolean("action.event.bubbleexception"));
    RunData data = getRunData(request,response,config);
    PipelineData pipelineData = new DefaultPipelineData();
    Map runDataMap = new HashMap();
    runDataMap.put(RunData.class, data);
    pipelineData.put(RunData.class, runDataMap);
    data.setAction("VelocityActionThrowsException");
    try {
      ActionLoader.getInstance().exec(data, data.getAction());

    } catch (Exception e) {
View Full Code Here

  public void testActionEventDoesntBubbleException() throws Exception {
    // can't seem to figure out how to setup the Mock Request with the right parameters...
    Turbine.getConfiguration().setProperty("action.event.bubbleexception",Boolean.FALSE);
    request.setupAddParameter("eventSubmit_doCauseexception", "foo");
    RunData data = getRunData(request,response,config);
    PipelineData pipelineData = new DefaultPipelineData();
    Map runDataMap = new HashMap();
    runDataMap.put(RunData.class, data);
    pipelineData.put(RunData.class, runDataMap);
    data.setAction("VelocityActionThrowsException");
    data.getParameters().add("eventSubmit_doCauseexception", "foo");
    assertTrue(
      data.getParameters().containsKey("eventSubmit_doCauseexception"));
View Full Code Here

      fail("Should NOT have thrown an exception:" + e.getMessage());
    }
  }
  public void testNonexistentActionCausesError() throws Exception {
      RunData data = getRunData(request,response,config);
    PipelineData pipelineData = new DefaultPipelineData();
    Map runDataMap = new HashMap();
    runDataMap.put(RunData.class, data);
    pipelineData.put(RunData.class, runDataMap);
    data.setAction("ImaginaryAction");
    try {
      ActionLoader.getInstance().exec(data, "boo");
      fail("Should have thrown an exception");
    } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.apache.turbine.pipeline.DefaultPipelineData

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.