-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from hhelibeb/improve-custom-fields-description
improve custom fields description
- Loading branch information
Showing
5 changed files
with
200 additions
and
21 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
*"* use this source file for your ABAP unit test classes | ||
CLASS ltc_get_distinct_count DEFINITION FINAL FOR TESTING | ||
DURATION SHORT RISK LEVEL HARMLESS. | ||
PRIVATE SECTION. | ||
METHODS: setup. | ||
METHODS: empty_input FOR TESTING. | ||
METHODS: general_input FOR TESTING. | ||
METHODS: error_input FOR TESTING. | ||
ENDCLASS. | ||
|
||
CLASS ltc_get_distinct_count IMPLEMENTATION. | ||
|
||
METHOD setup. | ||
|
||
ENDMETHOD. | ||
METHOD empty_input. | ||
|
||
DATA: test_table TYPE STANDARD TABLE OF sflight. | ||
|
||
DATA(count) = zcl_afl_utilities=>get_distinct_count( tab_data = test_table field_name = 'CARRID' ). | ||
cl_abap_unit_assert=>assert_equals( | ||
act = count | ||
exp = 0 | ||
msg = |exp: 0, act:{ count }| | ||
). | ||
|
||
ENDMETHOD. | ||
METHOD general_input. | ||
|
||
DATA: test_table TYPE STANDARD TABLE OF sflight. | ||
|
||
test_table = VALUE #( | ||
( seatsmax = '1' ) | ||
( seatsmax = '55332' ) | ||
( seatsmax = '3' ) | ||
( seatsmax = '4' ) | ||
( seatsmax = '5' ) | ||
( seatsmax = '6' ) | ||
( seatsmax = '7' ) | ||
( seatsmax = '8' ) | ||
( seatsmax = '9' ) | ||
( seatsmax = '5' ) | ||
( seatsmax = '5' ) | ||
( seatsmax = '2' ) | ||
( seatsmax = '5' ) | ||
( seatsmax = '1' ) | ||
( seatsmax = '9' ) | ||
( seatsmax = '9' ) | ||
( seatsmax = '6' ) | ||
). | ||
|
||
DATA(count) = zcl_afl_utilities=>get_distinct_count( tab_data = test_table field_name = 'SEATSMAX' ). | ||
cl_abap_unit_assert=>assert_equals( | ||
act = count | ||
exp = 10 | ||
msg = |exp: 10, act:{ count }| | ||
). | ||
|
||
ENDMETHOD. | ||
METHOD error_input. | ||
|
||
DATA: test_table TYPE STANDARD TABLE OF sflight. | ||
|
||
DATA(count) = zcl_afl_utilities=>get_distinct_count( tab_data = test_table field_name = 'XCARRID' ). | ||
cl_abap_unit_assert=>assert_equals( | ||
act = count | ||
exp = 0 | ||
msg = |exp: 0, act:{ count }| | ||
). | ||
|
||
ENDMETHOD. | ||
|
||
ENDCLASS. |
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