From 515e48b84a80f0b42db3c683a2284fd13e65bc37 Mon Sep 17 00:00:00 2001 From: reinaortega <miguelangel.reinaortega@etsi.org> Date: Tue, 23 Jul 2019 12:02:30 +0200 Subject: [PATCH] TC_CSE_SUB_UPD_003 - Some minor issues fixed Signed-off-by: reinaortega <miguelangel.reinaortega@etsi.org> --- LibOneM2M/OneM2M_Functions.ttcn | 19 +++++++++++++++++-- LibOneM2M/OneM2M_Types.ttcn | 2 +- OneM2M_Testcases_CSE_Release_2.ttcn | 3 +-- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn index 036dfa5..79ebd54 100644 --- a/LibOneM2M/OneM2M_Functions.ttcn +++ b/LibOneM2M/OneM2M_Functions.ttcn @@ -5325,12 +5325,14 @@ module OneM2M_Functions { var integer v_numberOfAggregatedNotification; if (ischosen(p_primitiveContent.aE)){ - log("Representation contains AE resource representation"); + if(isvalue(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.aE)) { + log("Representation contains AE resource representation"); v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.aE, p_primitiveContent.aE); - log("Expected primitiveContent"); } + //TODO Probably to be removed these alternatives. Function is checking notification content else if(isvalue(p_requestPrimitive.primitiveContent.responsePrimitive.primitiveContent.aE)) { + log("Request contains a response primitive as content"); v_matchResult :=match(p_requestPrimitive.primitiveContent.responsePrimitive.primitiveContent.aE, p_primitiveContent.aE); } else if (isvalue(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list)) { @@ -5352,21 +5354,34 @@ module OneM2M_Functions { if (ischosen(p_primitiveContent.container)){ if(isvalue(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.container)) { + log("Representation contains container resource representation"); v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.container, p_primitiveContent.container) } + //TODO Probably to be removed these alternatives. Function is checking notification content else if(isvalue(p_requestPrimitive.primitiveContent.responsePrimitive.primitiveContent.container)) { + log("Request contains a response primitive as content"); v_matchResult := match(p_requestPrimitive.primitiveContent.responsePrimitive.primitiveContent.container, p_primitiveContent.container) } } if (ischosen(p_primitiveContent.timeSeries)){ if(isvalue(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.timeSeries)) { + log("Representation contains timeSeries resource representation"); v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.timeSeries, p_primitiveContent.timeSeries) } + //TODO Probably to be removed these alternatives. Function is checking notification content else if(isvalue(p_requestPrimitive.primitiveContent.responsePrimitive.primitiveContent.timeSeries)) { + log("Request contains a response primitive as content"); v_matchResult := match(p_requestPrimitive.primitiveContent.responsePrimitive.primitiveContent.timeSeries, p_primitiveContent.timeSeries) } } + + if (ischosen(p_primitiveContent.uRI)){ + if(isvalue(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.uRI)) { + log("Representation contains URI element"); + v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.uRI, p_primitiveContent.uRI) + } + } return v_matchResult; diff --git a/LibOneM2M/OneM2M_Types.ttcn b/LibOneM2M/OneM2M_Types.ttcn index 2e97194..9bc28a5 100644 --- a/LibOneM2M/OneM2M_Types.ttcn +++ b/LibOneM2M/OneM2M_Types.ttcn @@ -5191,7 +5191,7 @@ with { //FIXME To replace Representation type by this type union Representation { Resource_2 resource, - XSD.AnyURI uRI + URI uRI } with { variant "name as 'representation'"; diff --git a/OneM2M_Testcases_CSE_Release_2.ttcn b/OneM2M_Testcases_CSE_Release_2.ttcn index ffccedd..091fbe9 100644 --- a/OneM2M_Testcases_CSE_Release_2.ttcn +++ b/OneM2M_Testcases_CSE_Release_2.ttcn @@ -3157,9 +3157,7 @@ module OneM2M_Testcases_CSE_Release_2 { var integer v_ae2Index := -1; v_updateRequest.primitiveContent.aE.labels := v_labels_1; - v_contentResponse.uRI := ?; - // Test control // Test component configuration @@ -3169,6 +3167,7 @@ module OneM2M_Testcases_CSE_Release_2 { // Preamble v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + v_contentResponse.uRI := f_getAeId(v_aeIndex); f_cse_preamble_subscriptionVerification(v_ae2Index, v_createRequest, int23); -- GitLab