public class CallMethodRuleTestCase extends Object
 Tests for the CallMethodRule and associated CallParamRule.
| Constructor and Description | 
|---|
CallMethodRuleTestCase()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected InputStream | 
getInputStream(String name)
Return an appropriate InputStream for the specified test file (which must be inside our current package. 
 | 
void | 
testBasic()
Test method calls with the CallMethodRule rule. 
 | 
void | 
testCallInvalidTarget()
Test invoking an object which does not exist on the stack. 
 | 
void | 
testCallMethodOnly()
Test method calls with the CallMethodRule reading from the element body, with no CallParamMethod rules added. 
 | 
void | 
testCallNext()
Test invoking an object which is at top-1 on the stack, like SetNextRule does... 
 | 
void | 
testCallRoot()
Test invoking an object which is at the root of the stack, like SetRoot does... 
 | 
void | 
testFromStack()  | 
void | 
testNestedBody()  | 
void | 
testOrderNestedPartA()
Test that the target object for a CallMethodRule is the object that was on top of the object stack when the
 CallMethodRule fired, even when other rules fire between the CallMethodRule and its associated CallParamRules. 
 | 
void | 
testOrderNestedPartB()
Test nested CallMethod rules. 
 | 
void | 
testParamsFromStack()
This tests the call methods params enhancement that provides for more complex stack-based calls. 
 | 
void | 
testPathCallParam()
Test for the PathCallParamRule 
 | 
void | 
testPrimitiveReading()  | 
void | 
testProcessingHook()  | 
void | 
testSettingProperties()
Test CallMethodRule variants which specify the classes of the parameters to target methods. 
 | 
void | 
testTwoCalls()  | 
public CallMethodRuleTestCase()
public void testBasic() throws SAXException, IOException
SAXExceptionIOExceptionpublic void testCallMethodOnly() throws Exception
Exceptionpublic void testSettingProperties() throws SAXException, IOException
SAXExceptionIOExceptionpublic void testParamsFromStack() throws SAXException, IOException
SAXExceptionIOExceptionpublic void testOrderNestedPartA() throws Exception
The current implementation of CallMethodRule ensures this works by firing only at the end of the tag that CallMethodRule triggered on.
Exceptionpublic void testOrderNestedPartB() throws Exception
The current implementation of CallMethodRule, in which the method is invoked in its end() method, causes behaviour which some users find non-intuitive. In this test it can be seen to "reverse" the order of data processed. However this is the way CallMethodRule has always behaved, and it is expected that apps out there rely on this call order so this test is present to ensure that no-one changes this behaviour.
Exceptionpublic void testPrimitiveReading() throws Exception
Exceptionpublic void testFromStack() throws Exception
Exceptionpublic void testTwoCalls() throws Exception
Exceptionpublic void testNestedBody() throws Exception
Exceptionpublic void testProcessingHook() throws Exception
Exceptionpublic void testPathCallParam() throws Exception
Exceptionpublic void testCallInvalidTarget() throws Exception
Exceptionpublic void testCallNext() throws Exception
Exceptionpublic void testCallRoot() throws Exception
Exceptionprotected InputStream getInputStream(String name) throws IOException
name - Name of the test file we wantIOException - if an input/output error occursCopyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.