METHOD class_constructor. a1 = 'c2'. ENDMETHOD. ENDCLASS. DATA v1 TYPE string. START-OF-SELECTION. v1 = c2=>m1( ). This example shows how a subclass is used to change a static attribute of a superclass, and how the change is visible in a subclass of a different path in the in...
classZCL_POINTdefinitionpublicfinalcreate public.public section.dataXtypeI.methodsCONSTRUCTORimporting!IV_XtypeI!IV_YtypeI.private section.dataYtypeI.class-dataCOUNTtypeI.ENDCLASS.CLASSZCL_POINTIMPLEMENTATION.methodCONSTRUCTOR.me->x=iv_x.me->y=iv_y.count=count+1.endmethod.ENDCLASS. In this class...
1-) Static classes are implicitly loaded first time they are used, and the corresponding static constructor -of available- is executed. They remain in the memory as long as the current internal session exists. Therefore, if you use static classes, you cannot actually control the time of initia...
Constructors of an "abstract" class should not be declared "public" Code Smell Annotated Mockito objects should be initialized Bug Tests should use fixed data instead of randomized data Code Smell Similar tests should be grouped in a single Parameterized test Code Smell Tests should be stable Code...