In Abap in Eclipse, go to Preferences -> ABAP Development -> Editors -> Source Code Editors -> ABAP Template. Add a new template called alternatievTestClass
This is the template:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLASS ${enclosing_object} DEFINITION FOR TESTING | |
PUBLIC ABSTRACT | |
DURATION ${SHORT} RISK LEVEL ${HARMLESS}. | |
PROTECTED SECTION. | |
METHODS: | |
${first_test} FOR TESTING. | |
ENDCLASS. | |
CLASS ${enclosing_object} IMPLEMENTATION. | |
METHOD ${first_test}. | |
${cursor}cl_abap_unit_assert=>fail( 'Implement your first test here' ). | |
ENDMETHOD. | |
ENDCLASS. | |
"Move this class to the local test class include | |
CLASS ltc_runner DEFINITION FOR TESTING | |
DURATION ${SHORT} RISK LEVEL ${HARMLESS} | |
INHERITING FROM ${enclosing_object}. | |
ENDCLASS. |
Comments
Post a Comment