mirror of
https://github.com/abap2xlsx/abap2xlsx.git
synced 2025-05-05 19:26:10 +08:00
Replace useless ZCL_EXCEL_AUNIT (#796)
Fix #715. Replaced with CL_ABAP_UNIT_ASSERT. Class ZCL_EXCEL_AUNIT deleted. Co-authored-by: sandra <sandra.rossi@gmail.com> Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
parent
69d4883773
commit
41d5553181
|
@ -1,120 +0,0 @@
|
||||||
CLASS zcl_excel_aunit DEFINITION
|
|
||||||
PUBLIC
|
|
||||||
FINAL
|
|
||||||
CREATE PRIVATE.
|
|
||||||
|
|
||||||
PUBLIC SECTION.
|
|
||||||
|
|
||||||
CLASS-METHODS class_constructor.
|
|
||||||
|
|
||||||
CLASS-METHODS assert_differs
|
|
||||||
IMPORTING
|
|
||||||
!exp TYPE simple
|
|
||||||
!act TYPE simple
|
|
||||||
!msg TYPE csequence OPTIONAL
|
|
||||||
!level TYPE aunit_level DEFAULT if_aunit_constants=>critical
|
|
||||||
!tol TYPE f OPTIONAL
|
|
||||||
!quit TYPE aunit_flowctrl DEFAULT if_aunit_constants=>method
|
|
||||||
RETURNING
|
|
||||||
VALUE(assertion_failed) TYPE abap_bool.
|
|
||||||
|
|
||||||
CLASS-METHODS assert_equals
|
|
||||||
IMPORTING
|
|
||||||
!exp TYPE any
|
|
||||||
!act TYPE any
|
|
||||||
!msg TYPE csequence OPTIONAL
|
|
||||||
!level TYPE aunit_level DEFAULT if_aunit_constants=>critical
|
|
||||||
!tol TYPE f OPTIONAL
|
|
||||||
!quit TYPE aunit_flowctrl DEFAULT if_aunit_constants=>method
|
|
||||||
!ignore_hash_sequence TYPE abap_bool DEFAULT abap_false
|
|
||||||
RETURNING
|
|
||||||
VALUE(assertion_failed) TYPE abap_bool.
|
|
||||||
|
|
||||||
CLASS-METHODS fail
|
|
||||||
IMPORTING
|
|
||||||
msg TYPE csequence OPTIONAL
|
|
||||||
level TYPE aunit_level DEFAULT if_aunit_constants=>critical
|
|
||||||
quit TYPE aunit_flowctrl DEFAULT if_aunit_constants=>method
|
|
||||||
detail TYPE csequence OPTIONAL.
|
|
||||||
|
|
||||||
PROTECTED SECTION.
|
|
||||||
PRIVATE SECTION.
|
|
||||||
TYPES tv_clsname TYPE seoclass-clsname.
|
|
||||||
|
|
||||||
CONSTANTS:
|
|
||||||
BEGIN OF en_clsname,
|
|
||||||
new TYPE tv_clsname VALUE 'CL_ABAP_UNIT_ASSERT',
|
|
||||||
old TYPE tv_clsname VALUE 'CL_AUNIT_ASSERT',
|
|
||||||
none TYPE tv_clsname VALUE '',
|
|
||||||
END OF en_clsname.
|
|
||||||
|
|
||||||
CLASS-DATA clsname TYPE tv_clsname.
|
|
||||||
ENDCLASS.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CLASS zcl_excel_aunit IMPLEMENTATION.
|
|
||||||
|
|
||||||
METHOD class_constructor.
|
|
||||||
" Let see >=7.02
|
|
||||||
SELECT SINGLE clsname INTO clsname
|
|
||||||
FROM seoclass
|
|
||||||
WHERE clsname = en_clsname-new.
|
|
||||||
|
|
||||||
CHECK sy-subrc <> 0.
|
|
||||||
|
|
||||||
" Let see >=7.00 or even lower
|
|
||||||
SELECT SINGLE clsname INTO clsname
|
|
||||||
FROM seoclass
|
|
||||||
WHERE clsname = en_clsname-old.
|
|
||||||
|
|
||||||
CHECK sy-subrc <> 0.
|
|
||||||
|
|
||||||
" We do nothing for now not supported
|
|
||||||
|
|
||||||
ENDMETHOD.
|
|
||||||
|
|
||||||
METHOD assert_differs.
|
|
||||||
CHECK clsname = en_clsname-new OR clsname = en_clsname-old.
|
|
||||||
|
|
||||||
CALL METHOD (clsname)=>assert_differs
|
|
||||||
EXPORTING
|
|
||||||
exp = exp
|
|
||||||
act = act
|
|
||||||
msg = msg
|
|
||||||
level = level
|
|
||||||
tol = tol
|
|
||||||
quit = quit
|
|
||||||
RECEIVING
|
|
||||||
assertion_failed = assertion_failed.
|
|
||||||
|
|
||||||
ENDMETHOD.
|
|
||||||
|
|
||||||
METHOD assert_equals.
|
|
||||||
CHECK clsname = en_clsname-new OR clsname = en_clsname-old.
|
|
||||||
|
|
||||||
CALL METHOD (clsname)=>assert_equals
|
|
||||||
EXPORTING
|
|
||||||
exp = exp
|
|
||||||
act = act
|
|
||||||
msg = msg
|
|
||||||
level = level
|
|
||||||
tol = tol
|
|
||||||
quit = quit
|
|
||||||
ignore_hash_sequence = ignore_hash_sequence
|
|
||||||
RECEIVING
|
|
||||||
assertion_failed = assertion_failed.
|
|
||||||
ENDMETHOD.
|
|
||||||
|
|
||||||
METHOD fail.
|
|
||||||
CHECK clsname = en_clsname-new OR clsname = en_clsname-old.
|
|
||||||
|
|
||||||
CALL METHOD (clsname)=>fail
|
|
||||||
EXPORTING
|
|
||||||
msg = msg
|
|
||||||
level = level
|
|
||||||
quit = quit
|
|
||||||
detail = detail.
|
|
||||||
|
|
||||||
ENDMETHOD.
|
|
||||||
ENDCLASS.
|
|
|
@ -1,16 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<abapGit version="v1.0.0" serializer="LCL_OBJECT_CLAS" serializer_version="v1.0.0">
|
|
||||||
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
|
|
||||||
<asx:values>
|
|
||||||
<VSEOCLASS>
|
|
||||||
<CLSNAME>ZCL_EXCEL_AUNIT</CLSNAME>
|
|
||||||
<LANGU>E</LANGU>
|
|
||||||
<DESCRIPT>Unit test helper</DESCRIPT>
|
|
||||||
<STATE>1</STATE>
|
|
||||||
<CLSCCINCL>X</CLSCCINCL>
|
|
||||||
<FIXPT>X</FIXPT>
|
|
||||||
<UNICODE>X</UNICODE>
|
|
||||||
</VSEOCLASS>
|
|
||||||
</asx:values>
|
|
||||||
</asx:abap>
|
|
||||||
</abapGit>
|
|
|
@ -104,14 +104,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_column = zcl_excel_common=>convert_column2alpha( 1 ).
|
ep_column = zcl_excel_common=>convert_column2alpha( 1 ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_column
|
act = ep_column
|
||||||
exp = 'A'
|
exp = 'A'
|
||||||
msg = 'Wrong column conversion'
|
msg = 'Wrong column conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -121,14 +121,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_column = zcl_excel_common=>convert_column2alpha( 16384 ).
|
ep_column = zcl_excel_common=>convert_column2alpha( 16384 ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_column
|
act = ep_column
|
||||||
exp = 'XFD'
|
exp = 'XFD'
|
||||||
msg = 'Wrong column conversion'
|
msg = 'Wrong column conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -138,12 +138,12 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_column = zcl_excel_common=>convert_column2alpha( 0 ).
|
ep_column = zcl_excel_common=>convert_column2alpha( 0 ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_column
|
act = ep_column
|
||||||
exp = 'A'
|
exp = 'A'
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lx_excel->error
|
act = lx_excel->error
|
||||||
exp = 'Index out of bounds'
|
exp = 'Index out of bounds'
|
||||||
msg = 'Colum index 0 is out of bounds, min column index is 1'
|
msg = 'Colum index 0 is out of bounds, min column index is 1'
|
||||||
|
@ -155,14 +155,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_column = zcl_excel_common=>convert_column2alpha( 16385 ).
|
ep_column = zcl_excel_common=>convert_column2alpha( 16385 ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_differs(
|
cl_abap_unit_assert=>assert_differs(
|
||||||
act = ep_column
|
act = ep_column
|
||||||
exp = 'XFE'
|
exp = 'XFE'
|
||||||
msg = 'Colum index 16385 is out of bounds, max column index is 16384'
|
msg = 'Colum index 16385 is out of bounds, max column index is 16384'
|
||||||
level = if_aunit_constants=>fatal
|
level = if_aunit_constants=>fatal
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lx_excel->error
|
act = lx_excel->error
|
||||||
exp = 'Index out of bounds'
|
exp = 'Index out of bounds'
|
||||||
msg = 'Wrong exception is thrown'
|
msg = 'Wrong exception is thrown'
|
||||||
|
@ -180,14 +180,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_column = zcl_excel_common=>convert_column2int( 'A' ).
|
ep_column = zcl_excel_common=>convert_column2int( 'A' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_column
|
act = ep_column
|
||||||
exp = 1
|
exp = 1
|
||||||
msg = 'Wrong column conversion'
|
msg = 'Wrong column conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -197,14 +197,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_column = zcl_excel_common=>convert_column2int( 'XFD' ).
|
ep_column = zcl_excel_common=>convert_column2int( 'XFD' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_column
|
act = ep_column
|
||||||
exp = 16384
|
exp = 16384
|
||||||
msg = 'Wrong column conversion'
|
msg = 'Wrong column conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -214,7 +214,7 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_column = zcl_excel_common=>convert_column2int( '' ).
|
ep_column = zcl_excel_common=>convert_column2int( '' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_differs( act = ep_column
|
cl_abap_unit_assert=>assert_differs( act = ep_column
|
||||||
exp = '0'
|
exp = '0'
|
||||||
msg = 'Wrong column conversion'
|
msg = 'Wrong column conversion'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
|
@ -225,7 +225,7 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
ls_symsg_exp-msgno = '800'.
|
ls_symsg_exp-msgno = '800'.
|
||||||
ls_symsg_act-msgid = lx_excel->syst_at_raise-msgid.
|
ls_symsg_act-msgid = lx_excel->syst_at_raise-msgid.
|
||||||
ls_symsg_act-msgno = lx_excel->syst_at_raise-msgno.
|
ls_symsg_act-msgno = lx_excel->syst_at_raise-msgno.
|
||||||
zcl_excel_aunit=>assert_equals( act = ls_symsg_act
|
cl_abap_unit_assert=>assert_equals( act = ls_symsg_act
|
||||||
exp = ls_symsg_exp
|
exp = ls_symsg_exp
|
||||||
msg = 'Colum name should be a valid string'
|
msg = 'Colum name should be a valid string'
|
||||||
level = if_aunit_constants=>fatal ).
|
level = if_aunit_constants=>fatal ).
|
||||||
|
@ -235,12 +235,12 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_column = zcl_excel_common=>convert_column2int( 'XFE' ).
|
ep_column = zcl_excel_common=>convert_column2int( 'XFE' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_differs( act = ep_column
|
cl_abap_unit_assert=>assert_differs( act = ep_column
|
||||||
exp = 16385
|
exp = 16385
|
||||||
msg = 'Wrong column conversion'
|
msg = 'Wrong column conversion'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>assert_equals( act = lx_excel->error
|
cl_abap_unit_assert=>assert_equals( act = lx_excel->error
|
||||||
exp = 'Index out of bounds'
|
exp = 'Index out of bounds'
|
||||||
msg = 'Colum XFE is out of range'
|
msg = 'Colum XFE is out of range'
|
||||||
level = if_aunit_constants=>fatal ).
|
level = if_aunit_constants=>fatal ).
|
||||||
|
@ -256,14 +256,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_value = zcl_excel_common=>date_to_excel_string( '19000101' ).
|
ep_value = zcl_excel_common=>date_to_excel_string( '19000101' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_value
|
act = ep_value
|
||||||
exp = 1
|
exp = 1
|
||||||
msg = 'Wrong date conversion'
|
msg = 'Wrong date conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -272,14 +272,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_value = zcl_excel_common=>date_to_excel_string( '19000228' ).
|
ep_value = zcl_excel_common=>date_to_excel_string( '19000228' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_value
|
act = ep_value
|
||||||
exp = 59
|
exp = 59
|
||||||
msg = 'Wrong date conversion'
|
msg = 'Wrong date conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -287,14 +287,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_value = zcl_excel_common=>date_to_excel_string( '19000301' ).
|
ep_value = zcl_excel_common=>date_to_excel_string( '19000301' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_value
|
act = ep_value
|
||||||
exp = 61
|
exp = 61
|
||||||
msg = 'Wrong date conversion'
|
msg = 'Wrong date conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -305,14 +305,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_value = zcl_excel_common=>date_to_excel_string( '99991212' ).
|
ep_value = zcl_excel_common=>date_to_excel_string( '99991212' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_value
|
act = ep_value
|
||||||
exp = 2958446
|
exp = 2958446
|
||||||
msg = 'Wrong date conversion'
|
msg = 'Wrong date conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -323,14 +323,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
DATA: lv_date TYPE d.
|
DATA: lv_date TYPE d.
|
||||||
ep_value = zcl_excel_common=>date_to_excel_string( lv_date ).
|
ep_value = zcl_excel_common=>date_to_excel_string( lv_date ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_value
|
act = ep_value
|
||||||
exp = ''
|
exp = ''
|
||||||
msg = 'Wrong date conversion'
|
msg = 'Wrong date conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -341,14 +341,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
DATA exp_value TYPE zexcel_cell_value VALUE 0.
|
DATA exp_value TYPE zexcel_cell_value VALUE 0.
|
||||||
ep_value = zcl_excel_common=>date_to_excel_string( '18991231' ).
|
ep_value = zcl_excel_common=>date_to_excel_string( '18991231' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_differs(
|
cl_abap_unit_assert=>assert_differs(
|
||||||
act = ep_value
|
act = ep_value
|
||||||
exp = exp_value
|
exp = exp_value
|
||||||
msg = 'Wrong date conversion'
|
msg = 'Wrong date conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lx_excel->error
|
act = lx_excel->error
|
||||||
exp = 'Index out of bounds'
|
exp = 'Index out of bounds'
|
||||||
msg = 'Dates prior of 1900 are not available in excel'
|
msg = 'Dates prior of 1900 are not available in excel'
|
||||||
|
@ -366,14 +366,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
lv_encrypted_pwd = zcl_excel_common=>encrypt_password( 'test' ).
|
lv_encrypted_pwd = zcl_excel_common=>encrypt_password( 'test' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lv_encrypted_pwd
|
act = lv_encrypted_pwd
|
||||||
exp = 'CBEB'
|
exp = 'CBEB'
|
||||||
msg = 'Wrong password encryption'
|
msg = 'Wrong password encryption'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -390,14 +390,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_value = zcl_excel_common=>excel_string_to_date( '0' ).
|
ep_value = zcl_excel_common=>excel_string_to_date( '0' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_value
|
act = ep_value
|
||||||
exp = '00000000'
|
exp = '00000000'
|
||||||
msg = 'Wrong date conversion'
|
msg = 'Wrong date conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -406,14 +406,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_value = zcl_excel_common=>excel_string_to_date( '' ).
|
ep_value = zcl_excel_common=>excel_string_to_date( '' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_value
|
act = ep_value
|
||||||
exp = '00000000'
|
exp = '00000000'
|
||||||
msg = 'Wrong date conversion'
|
msg = 'Wrong date conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -422,14 +422,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_value = zcl_excel_common=>excel_string_to_date( ` ` ).
|
ep_value = zcl_excel_common=>excel_string_to_date( ` ` ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_value
|
act = ep_value
|
||||||
exp = '00000000'
|
exp = '00000000'
|
||||||
msg = 'Wrong date conversion'
|
msg = 'Wrong date conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -438,14 +438,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_value = zcl_excel_common=>excel_string_to_date( '1' ).
|
ep_value = zcl_excel_common=>excel_string_to_date( '1' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_value
|
act = ep_value
|
||||||
exp = '19000101'
|
exp = '19000101'
|
||||||
msg = 'Wrong date conversion'
|
msg = 'Wrong date conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -454,14 +454,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_value = zcl_excel_common=>excel_string_to_date( '59' ).
|
ep_value = zcl_excel_common=>excel_string_to_date( '59' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_value
|
act = ep_value
|
||||||
exp = '19000228'
|
exp = '19000228'
|
||||||
msg = 'Wrong date conversion'
|
msg = 'Wrong date conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -469,14 +469,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_value = zcl_excel_common=>excel_string_to_date( '61' ).
|
ep_value = zcl_excel_common=>excel_string_to_date( '61' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_value
|
act = ep_value
|
||||||
exp = '19000301'
|
exp = '19000301'
|
||||||
msg = 'Wrong date conversion'
|
msg = 'Wrong date conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -486,14 +486,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_value = zcl_excel_common=>excel_string_to_date( '1' ).
|
ep_value = zcl_excel_common=>excel_string_to_date( '1' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_value
|
act = ep_value
|
||||||
exp = '19000101'
|
exp = '19000101'
|
||||||
msg = 'Wrong date conversion'
|
msg = 'Wrong date conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -503,14 +503,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_value = zcl_excel_common=>excel_string_to_date( '2958465' ).
|
ep_value = zcl_excel_common=>excel_string_to_date( '2958465' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_value
|
act = ep_value
|
||||||
exp = '99991231'
|
exp = '99991231'
|
||||||
msg = 'Wrong date conversion'
|
msg = 'Wrong date conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -520,13 +520,13 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_value = zcl_excel_common=>excel_string_to_date( '2958466' ).
|
ep_value = zcl_excel_common=>excel_string_to_date( '2958466' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = |Unexpected result '{ ep_value }'|
|
msg = |Unexpected result '{ ep_value }'|
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
|
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lx_excel->error
|
act = lx_excel->error
|
||||||
exp = 'Unable to interpret date'
|
exp = 'Unable to interpret date'
|
||||||
msg = 'Time should be a valid date'
|
msg = 'Time should be a valid date'
|
||||||
|
@ -544,14 +544,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_value = zcl_excel_common=>excel_string_to_time( '0' ).
|
ep_value = zcl_excel_common=>excel_string_to_time( '0' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_value
|
act = ep_value
|
||||||
exp = '000000'
|
exp = '000000'
|
||||||
msg = 'Wrong date conversion'
|
msg = 'Wrong date conversion'
|
||||||
level = if_aunit_constants=>tolerable
|
level = if_aunit_constants=>tolerable
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -561,14 +561,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_value = zcl_excel_common=>excel_string_to_time( '1' ).
|
ep_value = zcl_excel_common=>excel_string_to_time( '1' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_value
|
act = ep_value
|
||||||
exp = '000000'
|
exp = '000000'
|
||||||
msg = 'Wrong date conversion'
|
msg = 'Wrong date conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -578,14 +578,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_value = zcl_excel_common=>excel_string_to_time( '0.99999' ).
|
ep_value = zcl_excel_common=>excel_string_to_time( '0.99999' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_value
|
act = ep_value
|
||||||
exp = '235959'
|
exp = '235959'
|
||||||
msg = 'Wrong date conversion'
|
msg = 'Wrong date conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -595,14 +595,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_value = zcl_excel_common=>excel_string_to_time( '4.1' ).
|
ep_value = zcl_excel_common=>excel_string_to_time( '4.1' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_value
|
act = ep_value
|
||||||
exp = '022400'
|
exp = '022400'
|
||||||
msg = 'Wrong date conversion'
|
msg = 'Wrong date conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -612,14 +612,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_value = zcl_excel_common=>excel_string_to_time( 'NaN' ).
|
ep_value = zcl_excel_common=>excel_string_to_time( 'NaN' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_differs(
|
cl_abap_unit_assert=>assert_differs(
|
||||||
act = ep_value
|
act = ep_value
|
||||||
exp = '000000'
|
exp = '000000'
|
||||||
msg = 'Wrong date conversion'
|
msg = 'Wrong date conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lx_excel->error
|
act = lx_excel->error
|
||||||
exp = 'Unable to interpret time'
|
exp = 'Unable to interpret time'
|
||||||
msg = 'Time should be a valid string'
|
msg = 'Time should be a valid string'
|
||||||
|
@ -637,14 +637,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_value = zcl_excel_common=>time_to_excel_string( '000001' ).
|
ep_value = zcl_excel_common=>time_to_excel_string( '000001' ).
|
||||||
" A test directly in Excel returns the value 0.0000115740740740741000
|
" A test directly in Excel returns the value 0.0000115740740740741000
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_value
|
act = ep_value
|
||||||
exp = '0.0000115740740741'
|
exp = '0.0000115740740741'
|
||||||
msg = 'Wrong date conversion'
|
msg = 'Wrong date conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -654,14 +654,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_value = zcl_excel_common=>time_to_excel_string( '235959' ).
|
ep_value = zcl_excel_common=>time_to_excel_string( '235959' ).
|
||||||
" A test directly in Excel returns the value 0.9999884259259260000000
|
" A test directly in Excel returns the value 0.9999884259259260000000
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_value
|
act = ep_value
|
||||||
exp = '0.9999884259259260'
|
exp = '0.9999884259259260'
|
||||||
msg = 'Wrong date conversion'
|
msg = 'Wrong date conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -671,14 +671,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_value = zcl_excel_common=>time_to_excel_string( '000000' ).
|
ep_value = zcl_excel_common=>time_to_excel_string( '000000' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_value
|
act = ep_value
|
||||||
exp = '0'
|
exp = '0'
|
||||||
msg = 'Wrong date conversion'
|
msg = 'Wrong date conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -688,14 +688,14 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
TRY.
|
TRY.
|
||||||
ep_value = zcl_excel_common=>time_to_excel_string( '022400' ).
|
ep_value = zcl_excel_common=>time_to_excel_string( '022400' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_value
|
act = ep_value
|
||||||
exp = '0.1000000000000000'
|
exp = '0.1000000000000000'
|
||||||
msg = 'Wrong date conversion'
|
msg = 'Wrong date conversion'
|
||||||
level = if_aunit_constants=>critical
|
level = if_aunit_constants=>critical
|
||||||
).
|
).
|
||||||
CATCH zcx_excel INTO lx_excel.
|
CATCH zcx_excel INTO lx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'unexpected exception'
|
msg = 'unexpected exception'
|
||||||
level = if_aunit_constants=>critical " Error Severity
|
level = if_aunit_constants=>critical " Error Severity
|
||||||
).
|
).
|
||||||
|
@ -717,19 +717,19 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
ep_extension = ep_extension
|
ep_extension = ep_extension
|
||||||
ep_dotextension = ep_dotextension ).
|
ep_dotextension = ep_dotextension ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_file
|
act = ep_file
|
||||||
exp = 'filename'
|
exp = 'filename'
|
||||||
msg = 'Split filename failed'
|
msg = 'Split filename failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_extension
|
act = ep_extension
|
||||||
exp = 'xml'
|
exp = 'xml'
|
||||||
msg = 'Split extension failed'
|
msg = 'Split extension failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_dotextension
|
act = ep_dotextension
|
||||||
exp = '.xml'
|
exp = '.xml'
|
||||||
msg = 'Split extension failed'
|
msg = 'Split extension failed'
|
||||||
|
@ -741,19 +741,19 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
ep_extension = ep_extension
|
ep_extension = ep_extension
|
||||||
ep_dotextension = ep_dotextension ).
|
ep_dotextension = ep_dotextension ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_file
|
act = ep_file
|
||||||
exp = 'filename'
|
exp = 'filename'
|
||||||
msg = 'Split filename failed'
|
msg = 'Split filename failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_extension
|
act = ep_extension
|
||||||
exp = ''
|
exp = ''
|
||||||
msg = 'Split extension failed'
|
msg = 'Split extension failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_dotextension
|
act = ep_dotextension
|
||||||
exp = ''
|
exp = ''
|
||||||
msg = 'Split extension failed'
|
msg = 'Split extension failed'
|
||||||
|
@ -781,27 +781,27 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
e_sheet = lv_sheet " Title
|
e_sheet = lv_sheet " Title
|
||||||
).
|
).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lv_column_start
|
act = lv_column_start
|
||||||
exp = ''
|
exp = ''
|
||||||
msg = 'Conversion of range failed'
|
msg = 'Conversion of range failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lv_column_end
|
act = lv_column_end
|
||||||
exp = ''
|
exp = ''
|
||||||
msg = 'Conversion of range failed'
|
msg = 'Conversion of range failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lv_row_start
|
act = lv_row_start
|
||||||
exp = ''
|
exp = ''
|
||||||
msg = 'Conversion of range failed'
|
msg = 'Conversion of range failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lv_row_end
|
act = lv_row_end
|
||||||
exp = ''
|
exp = ''
|
||||||
msg = 'Conversion of range failed'
|
msg = 'Conversion of range failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lv_sheet
|
act = lv_sheet
|
||||||
exp = ''
|
exp = ''
|
||||||
msg = 'Conversion of range failed'
|
msg = 'Conversion of range failed'
|
||||||
|
@ -819,27 +819,27 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
e_sheet = lv_sheet " Title
|
e_sheet = lv_sheet " Title
|
||||||
).
|
).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lv_column_start
|
act = lv_column_start
|
||||||
exp = 'B'
|
exp = 'B'
|
||||||
msg = 'Conversion of range failed'
|
msg = 'Conversion of range failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lv_column_end
|
act = lv_column_end
|
||||||
exp = 'D'
|
exp = 'D'
|
||||||
msg = 'Conversion of range failed'
|
msg = 'Conversion of range failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lv_row_start
|
act = lv_row_start
|
||||||
exp = '6'
|
exp = '6'
|
||||||
msg = 'Conversion of range failed'
|
msg = 'Conversion of range failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lv_row_end
|
act = lv_row_end
|
||||||
exp = '13'
|
exp = '13'
|
||||||
msg = 'Conversion of range failed'
|
msg = 'Conversion of range failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lv_sheet
|
act = lv_sheet
|
||||||
exp = 'Sheet 1'
|
exp = 'Sheet 1'
|
||||||
msg = 'Conversion of range failed'
|
msg = 'Conversion of range failed'
|
||||||
|
@ -857,27 +857,27 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
e_sheet = lv_sheet " Title
|
e_sheet = lv_sheet " Title
|
||||||
).
|
).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lv_column_start
|
act = lv_column_start
|
||||||
exp = 'B'
|
exp = 'B'
|
||||||
msg = 'Conversion of range failed'
|
msg = 'Conversion of range failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lv_column_end
|
act = lv_column_end
|
||||||
exp = 'D'
|
exp = 'D'
|
||||||
msg = 'Conversion of range failed'
|
msg = 'Conversion of range failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lv_row_start
|
act = lv_row_start
|
||||||
exp = '6'
|
exp = '6'
|
||||||
msg = 'Conversion of range failed'
|
msg = 'Conversion of range failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lv_row_end
|
act = lv_row_end
|
||||||
exp = '13'
|
exp = '13'
|
||||||
msg = 'Conversion of range failed'
|
msg = 'Conversion of range failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lv_sheet
|
act = lv_sheet
|
||||||
exp = 'Sheet1'
|
exp = 'Sheet1'
|
||||||
msg = 'Conversion of range failed'
|
msg = 'Conversion of range failed'
|
||||||
|
@ -895,27 +895,27 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
e_sheet = lv_sheet " Title
|
e_sheet = lv_sheet " Title
|
||||||
).
|
).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lv_column_start
|
act = lv_column_start
|
||||||
exp = 'B'
|
exp = 'B'
|
||||||
msg = 'Conversion of range failed'
|
msg = 'Conversion of range failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lv_column_end
|
act = lv_column_end
|
||||||
exp = 'D'
|
exp = 'D'
|
||||||
msg = 'Conversion of range failed'
|
msg = 'Conversion of range failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lv_row_start
|
act = lv_row_start
|
||||||
exp = '6'
|
exp = '6'
|
||||||
msg = 'Conversion of range failed'
|
msg = 'Conversion of range failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lv_row_end
|
act = lv_row_end
|
||||||
exp = '13'
|
exp = '13'
|
||||||
msg = 'Conversion of range failed'
|
msg = 'Conversion of range failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = lv_sheet
|
act = lv_sheet
|
||||||
exp = ''
|
exp = ''
|
||||||
msg = 'Conversion of range failed'
|
msg = 'Conversion of range failed'
|
||||||
|
@ -933,7 +933,7 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
lo_structdescr ?= cl_abap_structdescr=>describe_by_data( p_data = ls_test ).
|
lo_structdescr ?= cl_abap_structdescr=>describe_by_data( p_data = ls_test ).
|
||||||
lt_structure = zcl_excel_common=>describe_structure( io_struct = lo_structdescr ).
|
lt_structure = zcl_excel_common=>describe_structure( io_struct = lo_structdescr ).
|
||||||
READ TABLE lt_structure ASSIGNING <line> INDEX 1.
|
READ TABLE lt_structure ASSIGNING <line> INDEX 1.
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = <line>-fieldname
|
act = <line>-fieldname
|
||||||
exp = 'MANDT'
|
exp = 'MANDT'
|
||||||
msg = 'Describe structure failed'
|
msg = 'Describe structure failed'
|
||||||
|
@ -951,7 +951,7 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
lo_structdescr ?= cl_abap_structdescr=>describe_by_data( p_data = ls_ttest ).
|
lo_structdescr ?= cl_abap_structdescr=>describe_by_data( p_data = ls_ttest ).
|
||||||
lt_structure = zcl_excel_common=>describe_structure( io_struct = lo_structdescr ).
|
lt_structure = zcl_excel_common=>describe_structure( io_struct = lo_structdescr ).
|
||||||
READ TABLE lt_structure ASSIGNING <line> INDEX 1.
|
READ TABLE lt_structure ASSIGNING <line> INDEX 1.
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = <line>-fieldname
|
act = <line>-fieldname
|
||||||
exp = 'CARRID'
|
exp = 'CARRID'
|
||||||
msg = 'Describe structure failed'
|
msg = 'Describe structure failed'
|
||||||
|
@ -976,7 +976,7 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
'->'
|
'->'
|
||||||
&2
|
&2
|
||||||
into lv_message separated by space.
|
into lv_message separated by space.
|
||||||
zcl_excel_aunit=>assert_equals( act = lv_offset_cols
|
cl_abap_unit_assert=>assert_equals( act = lv_offset_cols
|
||||||
exp = &3
|
exp = &3
|
||||||
msg = lv_message
|
msg = lv_message
|
||||||
quit = 0 " continue tests
|
quit = 0 " continue tests
|
||||||
|
@ -987,7 +987,7 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
'->'
|
'->'
|
||||||
&2
|
&2
|
||||||
into lv_message separated by space.
|
into lv_message separated by space.
|
||||||
zcl_excel_aunit=>assert_equals( act = lv_offset_rows
|
cl_abap_unit_assert=>assert_equals( act = lv_offset_rows
|
||||||
exp = &4
|
exp = &4
|
||||||
msg = lv_message
|
msg = lv_message
|
||||||
quit = 0 " continue tests
|
quit = 0 " continue tests
|
||||||
|
@ -1026,7 +1026,7 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
'shifting formula '
|
'shifting formula '
|
||||||
&1
|
&1
|
||||||
into lv_message separated by space.
|
into lv_message separated by space.
|
||||||
zcl_excel_aunit=>assert_equals( act = lv_resulting_formula
|
cl_abap_unit_assert=>assert_equals( act = lv_resulting_formula
|
||||||
exp = &4
|
exp = &4
|
||||||
msg = lv_message
|
msg = lv_message
|
||||||
quit = 0 " continue tests
|
quit = 0 " continue tests
|
||||||
|
@ -1037,7 +1037,7 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
'shifting formula '
|
'shifting formula '
|
||||||
&1
|
&1
|
||||||
into lv_message separated by space.
|
into lv_message separated by space.
|
||||||
zcl_excel_aunit=>assert_equals( act = lv_resulting_formula
|
cl_abap_unit_assert=>assert_equals( act = lv_resulting_formula
|
||||||
exp = &4
|
exp = &4
|
||||||
msg = lv_message
|
msg = lv_message
|
||||||
quit = 0 " continue tests
|
quit = 0 " continue tests
|
||||||
|
@ -1077,13 +1077,13 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
ip_row = 2
|
ip_row = 2
|
||||||
ip_range = 'B2:D4' ).
|
ip_range = 'B2:D4' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_cell_in_range
|
act = ep_cell_in_range
|
||||||
exp = abap_true
|
exp = abap_true
|
||||||
msg = 'Check cell in range failed'
|
msg = 'Check cell in range failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
CATCH zcx_excel.
|
CATCH zcx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'Unexpected exception'
|
msg = 'Unexpected exception'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
ENDTRY.
|
ENDTRY.
|
||||||
|
@ -1095,13 +1095,13 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
ip_row = 4
|
ip_row = 4
|
||||||
ip_range = 'B2:D4' ).
|
ip_range = 'B2:D4' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_cell_in_range
|
act = ep_cell_in_range
|
||||||
exp = abap_true
|
exp = abap_true
|
||||||
msg = 'Check cell in range failed'
|
msg = 'Check cell in range failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
CATCH zcx_excel.
|
CATCH zcx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'Unexpected exception'
|
msg = 'Unexpected exception'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
ENDTRY.
|
ENDTRY.
|
||||||
|
@ -1113,13 +1113,13 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
ip_row = 3
|
ip_row = 3
|
||||||
ip_range = 'B2:D4' ).
|
ip_range = 'B2:D4' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_cell_in_range
|
act = ep_cell_in_range
|
||||||
exp = abap_false
|
exp = abap_false
|
||||||
msg = 'Check cell in range failed'
|
msg = 'Check cell in range failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
CATCH zcx_excel.
|
CATCH zcx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'Unexpected exception'
|
msg = 'Unexpected exception'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
ENDTRY.
|
ENDTRY.
|
||||||
|
@ -1131,13 +1131,13 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
ip_row = 1
|
ip_row = 1
|
||||||
ip_range = 'B2:D4' ).
|
ip_range = 'B2:D4' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_cell_in_range
|
act = ep_cell_in_range
|
||||||
exp = abap_false
|
exp = abap_false
|
||||||
msg = 'Check cell in range failed'
|
msg = 'Check cell in range failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
CATCH zcx_excel.
|
CATCH zcx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'Unexpected exception'
|
msg = 'Unexpected exception'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
ENDTRY.
|
ENDTRY.
|
||||||
|
@ -1149,13 +1149,13 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
ip_row = 3
|
ip_row = 3
|
||||||
ip_range = 'B2:D4' ).
|
ip_range = 'B2:D4' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_cell_in_range
|
act = ep_cell_in_range
|
||||||
exp = abap_false
|
exp = abap_false
|
||||||
msg = 'Check cell in range failed'
|
msg = 'Check cell in range failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
CATCH zcx_excel.
|
CATCH zcx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'Unexpected exception'
|
msg = 'Unexpected exception'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
ENDTRY.
|
ENDTRY.
|
||||||
|
@ -1167,13 +1167,13 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
||||||
ip_row = 5
|
ip_row = 5
|
||||||
ip_range = 'B2:D4' ).
|
ip_range = 'B2:D4' ).
|
||||||
|
|
||||||
zcl_excel_aunit=>assert_equals(
|
cl_abap_unit_assert=>assert_equals(
|
||||||
act = ep_cell_in_range
|
act = ep_cell_in_range
|
||||||
exp = abap_false
|
exp = abap_false
|
||||||
msg = 'Check cell in range failed'
|
msg = 'Check cell in range failed'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
CATCH zcx_excel.
|
CATCH zcx_excel.
|
||||||
zcl_excel_aunit=>fail(
|
cl_abap_unit_assert=>fail(
|
||||||
msg = 'Unexpected exception'
|
msg = 'Unexpected exception'
|
||||||
level = if_aunit_constants=>critical ).
|
level = if_aunit_constants=>critical ).
|
||||||
ENDTRY.
|
ENDTRY.
|
||||||
|
|
|
@ -88,7 +88,7 @@ CLASS LCL_EXCEL_WORKSHEET_TEST IMPLEMENTATION.
|
||||||
LT_MERGE = F_CUT->GET_MERGE( ).
|
LT_MERGE = F_CUT->GET_MERGE( ).
|
||||||
LV_SIZE = LINES( LT_MERGE ).
|
LV_SIZE = LINES( LT_MERGE ).
|
||||||
|
|
||||||
ZCL_EXCEL_AUNIT=>ASSERT_EQUALS(
|
CL_ABAP_UNIT_ASSERT=>ASSERT_EQUALS(
|
||||||
ACT = LV_SIZE
|
ACT = LV_SIZE
|
||||||
EXP = 0
|
EXP = 0
|
||||||
MSG = 'Initial state of merge table is not empty'
|
MSG = 'Initial state of merge table is not empty'
|
||||||
|
@ -108,7 +108,7 @@ CLASS LCL_EXCEL_WORKSHEET_TEST IMPLEMENTATION.
|
||||||
LT_MERGE = F_CUT->GET_MERGE( ).
|
LT_MERGE = F_CUT->GET_MERGE( ).
|
||||||
LV_SIZE_NEXT = LINES( LT_MERGE ).
|
LV_SIZE_NEXT = LINES( LT_MERGE ).
|
||||||
|
|
||||||
ZCL_EXCEL_AUNIT=>ASSERT_EQUALS(
|
CL_ABAP_UNIT_ASSERT=>ASSERT_EQUALS(
|
||||||
ACT = LV_SIZE_NEXT - LV_SIZE
|
ACT = LV_SIZE_NEXT - LV_SIZE
|
||||||
EXP = 1
|
EXP = 1
|
||||||
MSG = 'Expect add 1 table line when 1 merge added'
|
MSG = 'Expect add 1 table line when 1 merge added'
|
||||||
|
@ -132,7 +132,7 @@ CLASS LCL_EXCEL_WORKSHEET_TEST IMPLEMENTATION.
|
||||||
LT_MERGE = F_CUT->GET_MERGE( ).
|
LT_MERGE = F_CUT->GET_MERGE( ).
|
||||||
LV_SIZE_NEXT = LINES( LT_MERGE ).
|
LV_SIZE_NEXT = LINES( LT_MERGE ).
|
||||||
|
|
||||||
ZCL_EXCEL_AUNIT=>ASSERT_EQUALS(
|
CL_ABAP_UNIT_ASSERT=>ASSERT_EQUALS(
|
||||||
ACT = LV_SIZE_NEXT - LV_SIZE
|
ACT = LV_SIZE_NEXT - LV_SIZE
|
||||||
EXP = 0
|
EXP = 0
|
||||||
MSG = 'Expect no change when add same merge'
|
MSG = 'Expect no change when add same merge'
|
||||||
|
@ -153,7 +153,7 @@ CLASS LCL_EXCEL_WORKSHEET_TEST IMPLEMENTATION.
|
||||||
LT_MERGE = F_CUT->GET_MERGE( ).
|
LT_MERGE = F_CUT->GET_MERGE( ).
|
||||||
LV_SIZE_NEXT = LINES( LT_MERGE ).
|
LV_SIZE_NEXT = LINES( LT_MERGE ).
|
||||||
|
|
||||||
ZCL_EXCEL_AUNIT=>ASSERT_EQUALS(
|
CL_ABAP_UNIT_ASSERT=>ASSERT_EQUALS(
|
||||||
ACT = LV_SIZE_NEXT - LV_SIZE
|
ACT = LV_SIZE_NEXT - LV_SIZE
|
||||||
EXP = 1
|
EXP = 1
|
||||||
MSG = 'Expect 1 change when add different merge'
|
MSG = 'Expect 1 change when add different merge'
|
||||||
|
@ -174,7 +174,7 @@ CLASS LCL_EXCEL_WORKSHEET_TEST IMPLEMENTATION.
|
||||||
LT_MERGE = F_CUT->GET_MERGE( ).
|
LT_MERGE = F_CUT->GET_MERGE( ).
|
||||||
READ TABLE LT_MERGE INTO LV_MERGE INDEX 1.
|
READ TABLE LT_MERGE INTO LV_MERGE INDEX 1.
|
||||||
|
|
||||||
ZCL_EXCEL_AUNIT=>ASSERT_EQUALS(
|
CL_ABAP_UNIT_ASSERT=>ASSERT_EQUALS(
|
||||||
ACT = LV_MERGE
|
ACT = LV_MERGE
|
||||||
EXP = 'B2:C3'
|
EXP = 'B2:C3'
|
||||||
MSG = 'Expect B2:C3'
|
MSG = 'Expect B2:C3'
|
||||||
|
@ -195,7 +195,7 @@ CLASS LCL_EXCEL_WORKSHEET_TEST IMPLEMENTATION.
|
||||||
LT_MERGE = F_CUT->GET_MERGE( ).
|
LT_MERGE = F_CUT->GET_MERGE( ).
|
||||||
READ TABLE LT_MERGE INTO LV_MERGE INDEX 1.
|
READ TABLE LT_MERGE INTO LV_MERGE INDEX 1.
|
||||||
|
|
||||||
ZCL_EXCEL_AUNIT=>ASSERT_EQUALS(
|
CL_ABAP_UNIT_ASSERT=>ASSERT_EQUALS(
|
||||||
ACT = LV_MERGE
|
ACT = LV_MERGE
|
||||||
EXP = 'D4:E5'
|
EXP = 'D4:E5'
|
||||||
MSG = 'Expect D4:E5'
|
MSG = 'Expect D4:E5'
|
||||||
|
@ -224,7 +224,7 @@ CLASS LCL_EXCEL_WORKSHEET_TEST IMPLEMENTATION.
|
||||||
LT_MERGE = F_CUT->GET_MERGE( ).
|
LT_MERGE = F_CUT->GET_MERGE( ).
|
||||||
LV_SIZE = LINES( LT_MERGE ).
|
LV_SIZE = LINES( LT_MERGE ).
|
||||||
|
|
||||||
ZCL_EXCEL_AUNIT=>ASSERT_EQUALS(
|
CL_ABAP_UNIT_ASSERT=>ASSERT_EQUALS(
|
||||||
ACT = LV_SIZE
|
ACT = LV_SIZE
|
||||||
EXP = 0
|
EXP = 0
|
||||||
MSG = 'Expect merge table with 1 line fully cleared'
|
MSG = 'Expect merge table with 1 line fully cleared'
|
||||||
|
@ -246,7 +246,7 @@ CLASS LCL_EXCEL_WORKSHEET_TEST IMPLEMENTATION.
|
||||||
LT_MERGE = F_CUT->GET_MERGE( ).
|
LT_MERGE = F_CUT->GET_MERGE( ).
|
||||||
LV_SIZE = LINES( LT_MERGE ).
|
LV_SIZE = LINES( LT_MERGE ).
|
||||||
|
|
||||||
ZCL_EXCEL_AUNIT=>ASSERT_EQUALS(
|
CL_ABAP_UNIT_ASSERT=>ASSERT_EQUALS(
|
||||||
ACT = LV_SIZE
|
ACT = LV_SIZE
|
||||||
EXP = 0
|
EXP = 0
|
||||||
MSG = 'Expect merge table with few lines fully cleared'
|
MSG = 'Expect merge table with few lines fully cleared'
|
||||||
|
@ -277,7 +277,7 @@ CLASS LCL_EXCEL_WORKSHEET_TEST IMPLEMENTATION.
|
||||||
LT_MERGE = F_CUT->GET_MERGE( ).
|
LT_MERGE = F_CUT->GET_MERGE( ).
|
||||||
LV_SIZE = LINES( LT_MERGE ).
|
LV_SIZE = LINES( LT_MERGE ).
|
||||||
|
|
||||||
ZCL_EXCEL_AUNIT=>ASSERT_EQUALS(
|
CL_ABAP_UNIT_ASSERT=>ASSERT_EQUALS(
|
||||||
ACT = LV_SIZE
|
ACT = LV_SIZE
|
||||||
EXP = 0
|
EXP = 0
|
||||||
MSG = 'Expect merge table with 1 line fully cleared'
|
MSG = 'Expect merge table with 1 line fully cleared'
|
||||||
|
@ -309,7 +309,7 @@ CLASS LCL_EXCEL_WORKSHEET_TEST IMPLEMENTATION.
|
||||||
LT_MERGE = F_CUT->GET_MERGE( ).
|
LT_MERGE = F_CUT->GET_MERGE( ).
|
||||||
LV_SIZE = LINES( LT_MERGE ).
|
LV_SIZE = LINES( LT_MERGE ).
|
||||||
|
|
||||||
ZCL_EXCEL_AUNIT=>ASSERT_EQUALS(
|
CL_ABAP_UNIT_ASSERT=>ASSERT_EQUALS(
|
||||||
ACT = LV_SIZE
|
ACT = LV_SIZE
|
||||||
EXP = 1
|
EXP = 1
|
||||||
MSG = 'Expect no merge were deleted'
|
MSG = 'Expect no merge were deleted'
|
||||||
|
@ -338,7 +338,7 @@ CLASS LCL_EXCEL_WORKSHEET_TEST IMPLEMENTATION.
|
||||||
LT_MERGE = F_CUT->GET_MERGE( ).
|
LT_MERGE = F_CUT->GET_MERGE( ).
|
||||||
LV_SIZE = LINES( LT_MERGE ).
|
LV_SIZE = LINES( LT_MERGE ).
|
||||||
|
|
||||||
ZCL_EXCEL_AUNIT=>ASSERT_EQUALS(
|
CL_ABAP_UNIT_ASSERT=>ASSERT_EQUALS(
|
||||||
ACT = LV_SIZE
|
ACT = LV_SIZE
|
||||||
EXP = 1
|
EXP = 1
|
||||||
MSG = 'Expect we have the one merge'
|
MSG = 'Expect we have the one merge'
|
||||||
|
@ -347,7 +347,7 @@ CLASS LCL_EXCEL_WORKSHEET_TEST IMPLEMENTATION.
|
||||||
|
|
||||||
READ TABLE LT_MERGE INTO LV_MERGE INDEX 1.
|
READ TABLE LT_MERGE INTO LV_MERGE INDEX 1.
|
||||||
|
|
||||||
ZCL_EXCEL_AUNIT=>ASSERT_EQUALS(
|
CL_ABAP_UNIT_ASSERT=>ASSERT_EQUALS(
|
||||||
ACT = LV_MERGE
|
ACT = LV_MERGE
|
||||||
EXP = 'D4:E5'
|
EXP = 'D4:E5'
|
||||||
MSG = 'Expect delete B2:C3 merge'
|
MSG = 'Expect delete B2:C3 merge'
|
||||||
|
@ -375,7 +375,7 @@ CLASS LCL_EXCEL_WORKSHEET_TEST IMPLEMENTATION.
|
||||||
LT_MERGE = F_CUT->GET_MERGE( ).
|
LT_MERGE = F_CUT->GET_MERGE( ).
|
||||||
LV_SIZE = LINES( LT_MERGE ).
|
LV_SIZE = LINES( LT_MERGE ).
|
||||||
|
|
||||||
ZCL_EXCEL_AUNIT=>ASSERT_EQUALS(
|
CL_ABAP_UNIT_ASSERT=>ASSERT_EQUALS(
|
||||||
ACT = LV_SIZE
|
ACT = LV_SIZE
|
||||||
EXP = 1
|
EXP = 1
|
||||||
MSG = 'Expect we have the one merge'
|
MSG = 'Expect we have the one merge'
|
||||||
|
@ -384,7 +384,7 @@ CLASS LCL_EXCEL_WORKSHEET_TEST IMPLEMENTATION.
|
||||||
|
|
||||||
READ TABLE LT_MERGE INTO LV_MERGE INDEX 1.
|
READ TABLE LT_MERGE INTO LV_MERGE INDEX 1.
|
||||||
|
|
||||||
ZCL_EXCEL_AUNIT=>ASSERT_EQUALS(
|
CL_ABAP_UNIT_ASSERT=>ASSERT_EQUALS(
|
||||||
ACT = LV_MERGE
|
ACT = LV_MERGE
|
||||||
EXP = 'B2:C3'
|
EXP = 'B2:C3'
|
||||||
MSG = 'Expect delete D4:E5 merge'
|
MSG = 'Expect delete D4:E5 merge'
|
||||||
|
@ -394,7 +394,7 @@ CLASS LCL_EXCEL_WORKSHEET_TEST IMPLEMENTATION.
|
||||||
ENDMETHOD. "delete_Merge
|
ENDMETHOD. "delete_Merge
|
||||||
|
|
||||||
METHOD GET_DIMENSION_RANGE.
|
METHOD GET_DIMENSION_RANGE.
|
||||||
ZCL_EXCEL_AUNIT=>ASSERT_EQUALS(
|
CL_ABAP_UNIT_ASSERT=>ASSERT_EQUALS(
|
||||||
ACT = F_CUT->GET_DIMENSION_RANGE( )
|
ACT = F_CUT->GET_DIMENSION_RANGE( )
|
||||||
EXP = 'A1'
|
EXP = 'A1'
|
||||||
MSG = 'get_dimension_range inital value'
|
MSG = 'get_dimension_range inital value'
|
||||||
|
@ -413,7 +413,7 @@ CLASS LCL_EXCEL_WORKSHEET_TEST IMPLEMENTATION.
|
||||||
IP_VALUE = 'Dummy'
|
IP_VALUE = 'Dummy'
|
||||||
).
|
).
|
||||||
|
|
||||||
ZCL_EXCEL_AUNIT=>ASSERT_EQUALS(
|
CL_ABAP_UNIT_ASSERT=>ASSERT_EQUALS(
|
||||||
ACT = F_CUT->GET_DIMENSION_RANGE( )
|
ACT = F_CUT->GET_DIMENSION_RANGE( )
|
||||||
EXP = 'C2:F5'
|
EXP = 'C2:F5'
|
||||||
MSG = 'get_dimension_range'
|
MSG = 'get_dimension_range'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user