Testing Methods
Use
You can test access to methods of a class using a test object. If the method has no export parameters, the system does not display a result screen.
Prerequisites
You must have instantiated the class you want to test. For more information, see Creating Instances.
Procedure
- In the Methods branch of the object display, select the method you want to execute.
- Choose the Execute icon to execute the method.
The appearance of the next screen depends on the method parameter definitions:
- If the method has import parameters, they are displayed and you can assign new values to them. The system automatically checks their type. Then choose Execute.
- If your entries do not contain errors, the method is called using the parameters you specified. You can also execute the method in debugging mode by choosing Debugging.
- For any other parameters, the method is called directly, and a result screen appears containing the runtime.
Result
You have used a test object to test the CALL METHOD statement for a class method.