You use this procedure to:
● Create an ABAP Unit test for a method of a class
● Create a local test class and create a local test class abap_unit_testclass in the class YCL_CHANGE_PLANETYPE_XX.
● Define a test method for testing method compare_planetype of your global class.
● Test the result of the method for both possible cases by using service method CL_AUNIT_ASSERT=>ASSERT_EQUALS.
...
1. Open the YCL_CHANGE_PLANETYPE_XX class in the Class Builder and choose Utilities à Test Class Generation.
2. Complete the following window as follows:
3. Choose Enter and adjust the generated source code as follows: