mirror of
https://github.com/abap2xlsx/abap2xlsx.git
synced 2025-05-05 19:16:10 +08:00
add basic unit test for recursive_struct_to_class
This commit is contained in:
parent
425b6a2b7d
commit
d4fa2db930
|
@ -122,6 +122,7 @@ CLASS lcl_excel_common_test DEFINITION FOR TESTING
|
|||
METHODS is_cell_in_range_upperside_out FOR TESTING.
|
||||
METHODS is_cell_in_range_rightside_out FOR TESTING.
|
||||
METHODS is_cell_in_range_lowerside_out FOR TESTING.
|
||||
METHODS recursive_struct_to_class FOR TESTING RAISING cx_static_check.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
|
@ -1597,4 +1598,28 @@ CLASS lcl_excel_common_test IMPLEMENTATION.
|
|||
ENDTRY.
|
||||
ENDMETHOD. "is_cell_in_range_lowerside_out.
|
||||
|
||||
METHOD recursive_struct_to_class.
|
||||
|
||||
DATA style TYPE REF TO zcl_excel_style.
|
||||
DATA complete_style TYPE zexcel_s_cstyle_complete.
|
||||
DATA complete_stylex TYPE zexcel_s_cstylex_complete.
|
||||
|
||||
CREATE OBJECT style.
|
||||
|
||||
complete_style-number_format-format_code = 'hello'.
|
||||
complete_stylex-number_format-format_code = abap_true.
|
||||
|
||||
zcl_excel_common=>recursive_struct_to_class(
|
||||
EXPORTING
|
||||
i_source = complete_style
|
||||
i_sourcex = complete_stylex
|
||||
CHANGING
|
||||
e_target = style ).
|
||||
|
||||
cl_abap_unit_assert=>assert_equals(
|
||||
act = style->number_format->format_code
|
||||
exp = 'hello' ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
ENDCLASS.
|
||||
|
|
Loading…
Reference in New Issue
Block a user