Skip to content

Commit

Permalink
Merge b54d07b into 2a4bdc9
Browse files Browse the repository at this point in the history
  • Loading branch information
larshp authored Aug 7, 2024
2 parents 2a4bdc9 + b54d07b commit 4439b71
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/ixml/cl_ixml.clas.testclasses.abap
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ CLASS ltcl_xml DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT FINAL.
METHODS render_element_and_attribute FOR TESTING RAISING cx_static_check.
METHODS render_element_and_two_attribu FOR TESTING RAISING cx_static_check.
METHODS render_attribute FOR TESTING RAISING cx_static_check.
METHODS render_attribute_multi FOR TESTING RAISING cx_static_check.
METHODS render_value FOR TESTING RAISING cx_static_check.
METHODS render_escape FOR TESTING RAISING cx_static_check.
METHODS render_nested FOR TESTING RAISING cx_static_check.
Expand Down Expand Up @@ -168,6 +169,30 @@ CLASS ltcl_xml IMPLEMENTATION.
exp = '<?xml version="1.0" encoding="utf-16"?><hello:moo name="value"/>' ).
ENDMETHOD.

METHOD render_attribute_multi.
DATA lo_element TYPE REF TO if_ixml_element.
DATA lv_xml TYPE string.

lo_element = mi_document->create_simple_element_ns(
prefix = 'hello'
name = 'moo'
parent = mi_document ).
lo_element->set_attribute(
name = 't'
value = 'value' ).
lo_element->set_attribute(
name = 'si'
value = 'value' ).
lo_element->set_attribute(
name = 'ref'
value = 'value' ).
lv_xml = render( ).

cl_abap_unit_assert=>assert_equals(
act = lv_xml
exp = '<?xml version="1.0" encoding="utf-16"?><hello:moo t="value" si="value" ref="value"/>' ).
ENDMETHOD.

METHOD render_element_and_attribute.
DATA lo_element TYPE REF TO if_ixml_element.
DATA lv_xml TYPE string.
Expand Down

0 comments on commit 4439b71

Please sign in to comment.