org.apache.turbine.modules
Class ActionLoaderTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.turbine.test.BaseTestCase
              extended by org.apache.turbine.modules.ActionLoaderTest
All Implemented Interfaces:
junit.framework.Test

public class ActionLoaderTest
extends BaseTestCase

This test case is to verify whether exceptions in Velocity actions are properly bubbled up when action.event.bubbleexception=true. Or, if action.event.bubbleexception=false, then the exceptions should be logged and sunk.

Author:
Eric Pugh, Peter Courcoux

Constructor Summary
ActionLoaderTest(String arg0)
          Constructor for VelocityErrorScreenTest.
 
Method Summary
protected  void setUp()
           
protected  void tearDown()
           
 void testActionEventBubblesException()
          This unit test verifies that if an Action Event doEventSubmit_ is called, and it throws an Exception, the exception is bubbled up out of the ActionLoader...
 void testActionEventDoesntBubbleException()
          This unit test verifies that if an Action Event doEventSubmit_ is called, and it throws an Exception, if the action.event.bubbleexception property is set to false then the exception is NOT bubbled up
 void testDoPerformBubblesException()
          This unit test verifies that if your standard doPerform is called, and it throws an Exception, the exception is bubbled up out of the ActionLoader...
 void testDoPerformDoesntBubbleException()
          This unit test verifies that if your standard doPerform is called, and it throws an Exception, if the action.event.bubbleexception property is set to false then the exception is NOT bubbled up
 void testDoPerformWithPipelineData()
           
 void testDoPerformWithRunData()
           
 void testNonexistentActionCausesError()
           
 
Methods inherited from class org.apache.turbine.test.BaseTestCase
getMockRequest, getPipelineData, getRunData
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ActionLoaderTest

public ActionLoaderTest(String arg0)
                 throws Exception
Constructor for VelocityErrorScreenTest.

Parameters:
arg0 -
Throws:
Exception
Method Detail

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
Exception

testDoPerformBubblesException

public void testDoPerformBubblesException()
                                   throws Exception
This unit test verifies that if your standard doPerform is called, and it throws an Exception, the exception is bubbled up out of the ActionLoader...

Throws:
Exception - If something goes wrong with the unit test

testActionEventBubblesException

public void testActionEventBubblesException()
                                     throws Exception
This unit test verifies that if an Action Event doEventSubmit_ is called, and it throws an Exception, the exception is bubbled up out of the ActionLoader...

Throws:
Exception - If something goes wrong with the unit test

testDoPerformDoesntBubbleException

public void testDoPerformDoesntBubbleException()
                                        throws Exception
This unit test verifies that if your standard doPerform is called, and it throws an Exception, if the action.event.bubbleexception property is set to false then the exception is NOT bubbled up

Throws:
Exception - If something goes wrong with the unit test

testActionEventDoesntBubbleException

public void testActionEventDoesntBubbleException()
                                          throws Exception
This unit test verifies that if an Action Event doEventSubmit_ is called, and it throws an Exception, if the action.event.bubbleexception property is set to false then the exception is NOT bubbled up

Throws:
Exception - If something goes wrong with the unit test

testNonexistentActionCausesError

public void testNonexistentActionCausesError()
                                      throws Exception
Throws:
Exception

testDoPerformWithRunData

public void testDoPerformWithRunData()
                              throws Exception
Throws:
Exception

testDoPerformWithPipelineData

public void testDoPerformWithPipelineData()
                                   throws Exception
Throws:
Exception


Copyright © 2000-2011 The Apache Software Foundation. All Rights Reserved.