Package org.apache.turbine.modules
Class ActionLoaderTest
- java.lang.Object
-
- org.apache.turbine.test.BaseTestCase
-
- org.apache.turbine.modules.ActionLoaderTest
-
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. Changes 2014/Jun/26 (gk): removed Constructor with String parameter as no Test VelocityErrorScreenTest is found and JUnit does not allow it.- Author:
- Eric Pugh, Peter Courcoux
-
-
Field Summary
-
Fields inherited from class org.apache.turbine.test.BaseTestCase
attributes, maxInactiveInterval
-
-
Constructor Summary
Constructors Constructor Description ActionLoaderTest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
init()
void
setUpBefore()
static void
tearDown()
void
testActionEventAnnotation()
This unit test verifies that if an Action Event doEventSubmit_ is called, a properly annotated method is being calledvoid
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 upvoid
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 upvoid
testDoPerformWithPipelineData()
void
testDoPerformWithServiceInjection()
void
testNonexistentActionCausesError()
-
Methods inherited from class org.apache.turbine.test.BaseTestCase
baseInit, getMockRequest, getPipelineData, getRunData
-
-
-
-
Constructor Detail
-
ActionLoaderTest
public ActionLoaderTest()
-
-
Method Detail
-
init
public static void init()
-
setUpBefore
public void setUpBefore() throws Exception
- 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
-
testActionEventAnnotation
public void testActionEventAnnotation() throws Exception
This unit test verifies that if an Action Event doEventSubmit_ is called, a properly annotated method is being called- Throws:
Exception
- If something goes wrong with the unit test
-
testNonexistentActionCausesError
public void testNonexistentActionCausesError() throws Exception
- Throws:
Exception
-
testDoPerformWithPipelineData
public void testDoPerformWithPipelineData() throws Exception
- Throws:
Exception
-
testDoPerformWithServiceInjection
public void testDoPerformWithServiceInjection() throws Exception
- Throws:
Exception
-
-