Show TOC

 Local Test ClassesLocate this document in the navigation structure

Use

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.
Procedure
  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:

  1. Choose Enter and adjust the generated source code as follows: