Skip to content

Commit

Permalink
Merge pull request #1 from RegestaItalia/abap
Browse files Browse the repository at this point in the history
abap code merge
  • Loading branch information
simonegaffurini authored Jul 5, 2024
2 parents 6fe9bc8 + 7606412 commit 409066d
Show file tree
Hide file tree
Showing 7 changed files with 116 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .abapgit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<DATA>
<MASTER_LANGUAGE>E</MASTER_LANGUAGE>
<STARTING_FOLDER>/src/</STARTING_FOLDER>
<FOLDER_LOGIC>PREFIX</FOLDER_LOGIC>
<VERSION_CONSTANT>ZIF_SAMPLETRMACTIONS_V=&gt;C_ABAP_VERSION</VERSION_CONSTANT>
</DATA>
</asx:values>
</asx:abap>
10 changes: 10 additions & 0 deletions src/package.devc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_DEVC" serializer_version="v1.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<DEVC>
<CTEXT>Example ABAP CI/CD</CTEXT>
</DEVC>
</asx:values>
</asx:abap>
</abapGit>
31 changes: 31 additions & 0 deletions src/zcl_sampletrmactions.clas.abap
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
CLASS zcl_sampletrmactions DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .

PUBLIC SECTION.

METHODS constructor.

METHODS sum
IMPORTING iv_val1 TYPE i
iv_val2 TYPE i
RETURNING VALUE(rv_result) TYPE i.

PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.



CLASS ZCL_SAMPLETRMACTIONS IMPLEMENTATION.

METHOD constructor.
" empty
ENDMETHOD.

METHOD sum.
rv_result = iv_val1 + iv_val2.
ENDMETHOD.

ENDCLASS.
26 changes: 26 additions & 0 deletions src/zcl_sampletrmactions.clas.testclasses.abap
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
*"* use this source file for your ABAP unit test classes
CLASS lcl_test DEFINITION FINAL FOR TESTING
DURATION SHORT
RISK LEVEL HARMLESS.

PRIVATE SECTION.
DATA: m_cut TYPE REF TO zcl_sampletrmactions.
METHODS setup.
METHODS test_sum FOR TESTING RAISING cx_static_check.
ENDCLASS.


CLASS lcl_test IMPLEMENTATION.

METHOD setup.
CREATE OBJECT m_cut.
ENDMETHOD.

METHOD test_sum.
cl_abap_unit_assert=>assert_equals( msg = 'Error in result 1 + 1'
exp = m_cut->sum( iv_val1 = 1
iv_val2 = 1 )
act = 2 ).
ENDMETHOD.

ENDCLASS.
17 changes: 17 additions & 0 deletions src/zcl_sampletrmactions.clas.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?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_SAMPLETRMACTIONS</CLSNAME>
<LANGU>E</LANGU>
<DESCRIPT>Class with example code</DESCRIPT>
<STATE>1</STATE>
<CLSCCINCL>X</CLSCCINCL>
<FIXPT>X</FIXPT>
<UNICODE>X</UNICODE>
<WITH_UNIT_TESTS>X</WITH_UNIT_TESTS>
</VSEOCLASS>
</asx:values>
</asx:abap>
</abapGit>
6 changes: 6 additions & 0 deletions src/zif_sampletrmactions_v.intf.abap
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
INTERFACE zif_sampletrmactions_v
PUBLIC .

CONSTANTS c_abap_version TYPE string VALUE '1.0.0' ##NO_TEXT.

ENDINTERFACE.
15 changes: 15 additions & 0 deletions src/zif_sampletrmactions_v.intf.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_INTF" serializer_version="v1.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<VSEOINTERF>
<CLSNAME>ZIF_SAMPLETRMACTIONS_V</CLSNAME>
<LANGU>E</LANGU>
<DESCRIPT>Version</DESCRIPT>
<EXPOSURE>2</EXPOSURE>
<STATE>1</STATE>
<UNICODE>X</UNICODE>
</VSEOINTERF>
</asx:values>
</asx:abap>
</abapGit>

0 comments on commit 409066d

Please sign in to comment.