mirror of
https://github.com/abapGit/abapGit.git
synced 2025-04-30 11:46:38 +08:00
delete commented unit test code #1189
This commit is contained in:
parent
60a4f5ed56
commit
52758028a7
|
@ -44,7 +44,6 @@ INCLUDE zabapgit_user_exit IF FOUND.
|
||||||
|
|
||||||
INCLUDE zabapgit_gui_pages_userexit IF FOUND.
|
INCLUDE zabapgit_gui_pages_userexit IF FOUND.
|
||||||
|
|
||||||
INCLUDE zabapgit_unit_test.
|
|
||||||
INCLUDE zabapgit_forms.
|
INCLUDE zabapgit_forms.
|
||||||
|
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
|
|
|
@ -1,183 +0,0 @@
|
||||||
*&---------------------------------------------------------------------*
|
|
||||||
*& Include ZABAPGIT_UNIT_TEST
|
|
||||||
*&---------------------------------------------------------------------*
|
|
||||||
|
|
||||||
* todo, should the tests be in the same include as the classes
|
|
||||||
* they are testing?
|
|
||||||
|
|
||||||
*CLASS ltcl_oo_serialize DEFINITION FINAL FOR TESTING
|
|
||||||
* DURATION SHORT
|
|
||||||
* RISK LEVEL HARMLESS.
|
|
||||||
*
|
|
||||||
* PRIVATE SECTION.
|
|
||||||
* METHODS:
|
|
||||||
* setup,
|
|
||||||
* empty_include FOR TESTING RAISING cx_static_check,
|
|
||||||
* one_line_include FOR TESTING RAISING cx_static_check,
|
|
||||||
* one_line_include_2 FOR TESTING RAISING cx_static_check,
|
|
||||||
* one_line_include_3 FOR TESTING RAISING cx_static_check,
|
|
||||||
* two_line_include FOR TESTING RAISING cx_static_check,
|
|
||||||
* two_line_include_2 FOR TESTING RAISING cx_static_check,
|
|
||||||
* two_line_include_3 FOR TESTING RAISING cx_static_check,
|
|
||||||
* more_than_two_lines FOR TESTING RAISING cx_static_check,
|
|
||||||
*
|
|
||||||
* _given_source_is
|
|
||||||
* IMPORTING
|
|
||||||
* i_source TYPE LINE OF zif_abapgit_definitions=>ty_string_tt,
|
|
||||||
* _given_empty_test_include,
|
|
||||||
* _when_skip_is_calculated,
|
|
||||||
* _then_should_be_skipped,
|
|
||||||
* _then_should_not_be_skipped.
|
|
||||||
*
|
|
||||||
* DATA: mo_oo_serializer TYPE REF TO lcl_oo_serializer,
|
|
||||||
* mt_source TYPE zif_abapgit_definitions=>ty_string_tt,
|
|
||||||
* mv_skip_testclass TYPE abap_bool.
|
|
||||||
*
|
|
||||||
*ENDCLASS.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*CLASS ltcl_oo_serialize IMPLEMENTATION.
|
|
||||||
*
|
|
||||||
* METHOD setup.
|
|
||||||
*
|
|
||||||
* CREATE OBJECT mo_oo_serializer.
|
|
||||||
*
|
|
||||||
* ENDMETHOD.
|
|
||||||
*
|
|
||||||
* METHOD empty_include.
|
|
||||||
*
|
|
||||||
* _given_empty_test_include( ).
|
|
||||||
*
|
|
||||||
* _when_skip_is_calculated( ).
|
|
||||||
*
|
|
||||||
* _then_should_be_skipped( ).
|
|
||||||
*
|
|
||||||
* ENDMETHOD.
|
|
||||||
*
|
|
||||||
* METHOD one_line_include.
|
|
||||||
*
|
|
||||||
* _given_source_is( `*"* use this source file for your ABAP unit test classes` ).
|
|
||||||
*
|
|
||||||
* _when_skip_is_calculated( ).
|
|
||||||
*
|
|
||||||
* _then_should_be_skipped( ).
|
|
||||||
*
|
|
||||||
* ENDMETHOD.
|
|
||||||
*
|
|
||||||
* METHOD one_line_include_2.
|
|
||||||
*
|
|
||||||
* _given_source_is( `*` ).
|
|
||||||
*
|
|
||||||
* _when_skip_is_calculated( ).
|
|
||||||
*
|
|
||||||
* _then_should_be_skipped( ).
|
|
||||||
*
|
|
||||||
* ENDMETHOD.
|
|
||||||
*
|
|
||||||
* METHOD one_line_include_3.
|
|
||||||
*
|
|
||||||
* _given_source_is( `write: 'This is ABAP'.` ).
|
|
||||||
*
|
|
||||||
* _when_skip_is_calculated( ).
|
|
||||||
*
|
|
||||||
* _then_should_not_be_skipped( ).
|
|
||||||
*
|
|
||||||
* ENDMETHOD.
|
|
||||||
*
|
|
||||||
* METHOD two_line_include.
|
|
||||||
*
|
|
||||||
* _given_source_is( `*"* use this source file for your ABAP unit test classes` ).
|
|
||||||
* _given_source_is( `` ).
|
|
||||||
*
|
|
||||||
* _when_skip_is_calculated( ).
|
|
||||||
*
|
|
||||||
* _then_should_be_skipped( ).
|
|
||||||
*
|
|
||||||
* ENDMETHOD.
|
|
||||||
*
|
|
||||||
* METHOD two_line_include_2.
|
|
||||||
*
|
|
||||||
* _given_source_is( `*"* use this source file for your ABAP unit test classes` ).
|
|
||||||
* _given_source_is( `write: 'This is ABAP'.` ).
|
|
||||||
*
|
|
||||||
* _when_skip_is_calculated( ).
|
|
||||||
*
|
|
||||||
* _then_should_not_be_skipped( ).
|
|
||||||
*
|
|
||||||
* ENDMETHOD.
|
|
||||||
*
|
|
||||||
* METHOD two_line_include_3.
|
|
||||||
*
|
|
||||||
* _given_source_is( ` ` ).
|
|
||||||
* _given_source_is( `*"* use this source file for your ABAP unit test classes` ).
|
|
||||||
*
|
|
||||||
* _when_skip_is_calculated( ).
|
|
||||||
*
|
|
||||||
* _then_should_not_be_skipped( ).
|
|
||||||
*
|
|
||||||
* ENDMETHOD.
|
|
||||||
*
|
|
||||||
* METHOD more_than_two_lines.
|
|
||||||
*
|
|
||||||
* _given_source_is( `*"* use this source file for your ABAP unit test classes` ).
|
|
||||||
* _given_source_is( `CLASS ltcl_test DEFINITION FINAL FOR TESTING` ).
|
|
||||||
* _given_source_is( ` DURATION SHORT` ).
|
|
||||||
* _given_source_is( ` RISK LEVEL HARMLESS.` ).
|
|
||||||
* _given_source_is( ` ` ).
|
|
||||||
* _given_source_is( ` PRIVATE SECTION.` ).
|
|
||||||
* _given_source_is( ` METHODS:` ).
|
|
||||||
* _given_source_is( ` first_test FOR TESTING RAISING cx_static_check.` ).
|
|
||||||
* _given_source_is( `ENDCLASS.` ).
|
|
||||||
* _given_source_is( ` ` ).
|
|
||||||
* _given_source_is( `CLASS ltcl_test IMPLEMENTATION.` ).
|
|
||||||
* _given_source_is( ` ` ).
|
|
||||||
* _given_source_is( ` METHOD first_test.` ).
|
|
||||||
* _given_source_is( ` cl_abap_unit_assert=>fail( 'This is a real test' ).` ).
|
|
||||||
* _given_source_is( ` ENDMETHOD.` ).
|
|
||||||
* _given_source_is( ` ` ).
|
|
||||||
* _given_source_is( `ENDCLASS.` ).
|
|
||||||
*
|
|
||||||
* _when_skip_is_calculated( ).
|
|
||||||
*
|
|
||||||
* _then_should_not_be_skipped( ).
|
|
||||||
*
|
|
||||||
* ENDMETHOD.
|
|
||||||
*
|
|
||||||
* METHOD _given_source_is.
|
|
||||||
*
|
|
||||||
* INSERT i_source INTO TABLE mt_source.
|
|
||||||
*
|
|
||||||
* ENDMETHOD.
|
|
||||||
*
|
|
||||||
* METHOD _given_empty_test_include.
|
|
||||||
*
|
|
||||||
* ENDMETHOD.
|
|
||||||
*
|
|
||||||
* METHOD _when_skip_is_calculated.
|
|
||||||
*
|
|
||||||
* mv_skip_testclass = mo_oo_serializer->calculate_skip_testclass( mt_source ).
|
|
||||||
*
|
|
||||||
* ENDMETHOD.
|
|
||||||
*
|
|
||||||
* METHOD _then_should_be_skipped.
|
|
||||||
*
|
|
||||||
* cl_abap_unit_assert=>assert_equals(
|
|
||||||
* act = mv_skip_testclass
|
|
||||||
* exp = abap_true
|
|
||||||
* msg = |Testclass should be skipped| ).
|
|
||||||
*
|
|
||||||
* ENDMETHOD.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* METHOD _then_should_not_be_skipped.
|
|
||||||
*
|
|
||||||
* cl_abap_unit_assert=>assert_equals(
|
|
||||||
* act = mv_skip_testclass
|
|
||||||
* exp = abap_false
|
|
||||||
* msg = |Testclass should not be skipped| ).
|
|
||||||
*
|
|
||||||
* ENDMETHOD.
|
|
||||||
*
|
|
||||||
*ENDCLASS.
|
|
||||||
|
|
||||||
INCLUDE zabapgit_unit_test_clas_intf.
|
|
|
@ -1,22 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<abapGit version="v1.0.0" serializer="LCL_OBJECT_PROG" serializer_version="v1.0.0">
|
|
||||||
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
|
|
||||||
<asx:values>
|
|
||||||
<PROGDIR>
|
|
||||||
<NAME>ZABAPGIT_UNIT_TEST</NAME>
|
|
||||||
<STATE>A</STATE>
|
|
||||||
<VARCL>X</VARCL>
|
|
||||||
<SUBC>I</SUBC>
|
|
||||||
<RLOAD>E</RLOAD>
|
|
||||||
<UCCHECK>X</UCCHECK>
|
|
||||||
</PROGDIR>
|
|
||||||
<TPOOL>
|
|
||||||
<item>
|
|
||||||
<ID>R</ID>
|
|
||||||
<ENTRY>Program ZABAPGIT_UNIT_TEST</ENTRY>
|
|
||||||
<LENGTH>26</LENGTH>
|
|
||||||
</item>
|
|
||||||
</TPOOL>
|
|
||||||
</asx:values>
|
|
||||||
</asx:abap>
|
|
||||||
</abapGit>
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,25 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<abapGit version="v1.0.0" serializer="LCL_OBJECT_PROG" serializer_version="v1.0.0">
|
|
||||||
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
|
|
||||||
<asx:values>
|
|
||||||
<PROGDIR>
|
|
||||||
<NAME>ZABAPGIT_UNIT_TEST_CLAS_INTF</NAME>
|
|
||||||
<STATE>A</STATE>
|
|
||||||
<VARCL>X</VARCL>
|
|
||||||
<DBAPL>S</DBAPL>
|
|
||||||
<DBNA>D$</DBNA>
|
|
||||||
<SUBC>I</SUBC>
|
|
||||||
<FIXPT>X</FIXPT>
|
|
||||||
<LDBNAME>D$S</LDBNAME>
|
|
||||||
<UCCHECK>X</UCCHECK>
|
|
||||||
</PROGDIR>
|
|
||||||
<TPOOL>
|
|
||||||
<item>
|
|
||||||
<ID>R</ID>
|
|
||||||
<ENTRY>Unit tests for classes and interfaces objecst</ENTRY>
|
|
||||||
<LENGTH>45</LENGTH>
|
|
||||||
</item>
|
|
||||||
</TPOOL>
|
|
||||||
</asx:values>
|
|
||||||
</asx:abap>
|
|
||||||
</abapGit>
|
|
Loading…
Reference in New Issue
Block a user