X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=E2Manager%2Fmodels%2Fric_service_update_message_test.go;h=de6a136c152c06320f2623a42ada7914757c2743;hb=70954308ad87e986f654b1fc7809ed5074cfcae5;hp=c9ea390f9ad01c6f7fe6730968be9fd9b23e600c;hpb=35e88d0910e291bc8b6c8dd2cb448afed59893aa;p=ric-plt%2Fe2mgr.git diff --git a/E2Manager/models/ric_service_update_message_test.go b/E2Manager/models/ric_service_update_message_test.go index c9ea390..de6a136 100644 --- a/E2Manager/models/ric_service_update_message_test.go +++ b/E2Manager/models/ric_service_update_message_test.go @@ -23,8 +23,9 @@ import ( "e2mgr/models" "e2mgr/utils" "encoding/xml" - "github.com/stretchr/testify/assert" "testing" + + "github.com/stretchr/testify/assert" ) func getTestRicServiceUpdate(t *testing.T, xmlPath string) *models.RICServiceUpdateMessage { @@ -47,3 +48,18 @@ func TestRicServiceUpdateMessageNoRanFunctions(t *testing.T) { serviceUpdate := getTestRicServiceUpdate(t, "../tests/resources/serviceUpdate/RicServiceUpdate_Empty.xml") assert.Nil(t, serviceUpdate.E2APPDU.ExtractRanFunctionsList()) } + +func TestRicServiceUpdateMessageWithOID(t *testing.T) { + serviceUpdate := getTestRicServiceUpdate(t, "../tests/resources/serviceUpdate/RicServiceUpdate_AddedFunction_With_OID.xml") + + ranFunctions := serviceUpdate.E2APPDU.ExtractRanFunctionsList() + + assert.Equal(t, uint32(20), ranFunctions[0].RanFunctionId) + assert.Equal(t, uint32(2), ranFunctions[0].RanFunctionRevision) + assert.Equal(t, "OID20", ranFunctions[0].RanFunctionOid) +} + +func TestRICServiceUpdateMessageTxId(t *testing.T) { + serviceUpdate := getTestRicServiceUpdate(t, "../tests/resources/serviceUpdate/RicServiceUpdate_AddedFunction_With_OID.xml") + assert.Equal(t, "1234", serviceUpdate.E2APPDU.InitiatingMessage.Value.RICServiceUpdate.ProtocolIEs.RICServiceUpdateIEs[0].Value.TransactionID) +}