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
SAXException
IOException
public void testCallMethodOnly() throws Exception
Exception
public void testSettingProperties() throws SAXException, IOException
SAXException
IOException
public void testParamsFromStack() throws SAXException, IOException
SAXException
IOException
public 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.
Exception
public 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.
Exception
public void testPrimitiveReading() throws Exception
Exception
public void testFromStack() throws Exception
Exception
public void testTwoCalls() throws Exception
Exception
public void testNestedBody() throws Exception
Exception
public void testProcessingHook() throws Exception
Exception
public void testPathCallParam() throws Exception
Exception
public void testCallInvalidTarget() throws Exception
Exception
public void testCallNext() throws Exception
Exception
public void testCallRoot() throws Exception
Exception
protected 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.