From 4f8efc828c2508dabd23b2d38d91329753113a80 Mon Sep 17 00:00:00 2001 From: Miguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org> Date: Thu, 23 Nov 2017 12:01:31 +0100 Subject: [PATCH] Corrections to REG_UPD_003 Signed-off-by: Miguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org> --- LibOneM2M/OneM2M_Functions.ttcn | 18 +----------------- OneM2M_Testcases_CSE.ttcn | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 32 deletions(-) diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn index 05386ab..f6b4a8a 100644 --- a/LibOneM2M/OneM2M_Functions.ttcn +++ b/LibOneM2M/OneM2M_Functions.ttcn @@ -2720,23 +2720,7 @@ module OneM2M_Functions { group CommonFunctions { - /** - * @desc Sending of an Adapter Control primitive - * @param event Action to be performed by TA - * @param data Corresponding information for the correct execution of the given action - * @verdict - */ - function f_bool2str(in boolean p_bool) runs on Tester return charstring { - - var charstring v_bool; - if (p_bool){ - v_bool := "true"; - }else{ - v_bool := "false"; - } - return v_bool; - } - + /** * @desc Sending of an Adapter Control primitive * @param event Action to be performed by TA diff --git a/OneM2M_Testcases_CSE.ttcn b/OneM2M_Testcases_CSE.ttcn index b93bf2f..f02181e 100644 --- a/OneM2M_Testcases_CSE.ttcn +++ b/OneM2M_Testcases_CSE.ttcn @@ -3028,11 +3028,11 @@ module OneM2M_Testcases_CSE { testcase TC_CSE_REG_UPD_003_ET() runs on Tester system CseSystem { // Local variables var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase; - var AttributeAux c_optionalAttribute; + var AttributeList c_optionalAttribute; var CseSimu v_cse1 := CseSimu.create("CSE1") alive; v_updateRequest.primitiveContent.remoteCSE.expirationTime := "20301231T012345"; - c_optionalAttribute := {"expirationTime", valueof(v_updateRequest).primitiveContent.remoteCSE.expirationTime}; + c_optionalAttribute := {"expirationTime"}; v_cse1.start(f_CSE_REG_UPD_003(v_updateRequest, c_optionalAttribute)); v_cse1.done; @@ -3042,11 +3042,11 @@ module OneM2M_Testcases_CSE { testcase TC_CSE_REG_UPD_003_LBL() runs on Tester system CseSystem { // Local variables var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase; - var AttributeAux c_optionalAttribute; + var AttributeList c_optionalAttribute; var CseSimu v_cse1 := CseSimu.create("CSE1") alive; v_updateRequest.primitiveContent.remoteCSE.labels := {"MyLabel"}; - c_optionalAttribute := {"labels", valueof(v_updateRequest).primitiveContent.remoteCSE.labels[0]}; + c_optionalAttribute := {"labels"}; v_cse1.start(f_CSE_REG_UPD_003(v_updateRequest, c_optionalAttribute)); v_cse1.done; @@ -3056,11 +3056,11 @@ module OneM2M_Testcases_CSE { testcase TC_CSE_REG_UPD_003_POA() runs on Tester system CseSystem { // Local variables var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase; - var AttributeAux c_optionalAttribute; + var AttributeList c_optionalAttribute; var CseSimu v_cse1 := CseSimu.create("CSE1") alive; v_updateRequest.primitiveContent.remoteCSE.pointOfAccess := {"http://" & PX_CSE1_ADDRESS & "/"}; - c_optionalAttribute := {"pointofAccess", valueof(v_updateRequest).primitiveContent.remoteCSE.pointOfAccess[0]}; + c_optionalAttribute := {"pointofAccess"}; v_cse1.start(f_CSE_REG_UPD_003(v_updateRequest, c_optionalAttribute)); v_cse1.done; @@ -3070,11 +3070,11 @@ module OneM2M_Testcases_CSE { testcase TC_CSE_REG_UPD_003_NL() runs on Tester system CseSystem { // Local variables var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase; - var AttributeAux c_optionalAttribute; + var AttributeList c_optionalAttribute; var CseSimu v_cse1 := CseSimu.create("CSE1") alive; v_updateRequest.primitiveContent.remoteCSE.nodeLink := c_defaultNodeID; - c_optionalAttribute := {"nodeLink", valueof(v_updateRequest).primitiveContent.remoteCSE.nodeLink}; + c_optionalAttribute := {"nodeLink"}; v_cse1.start(f_CSE_REG_UPD_003(v_updateRequest, c_optionalAttribute)); v_cse1.done; @@ -3084,25 +3084,25 @@ module OneM2M_Testcases_CSE { testcase TC_CSE_REG_UPD_003_RR() runs on Tester system CseSystem { // Local variables var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase; - var AttributeAux c_optionalAttribute; + var AttributeList c_optionalAttribute; var CseSimu v_cse1 := CseSimu.create("CSE1") alive; v_updateRequest.primitiveContent.remoteCSE.requestReachability := true; - c_optionalAttribute := {"requestReachability", f_bool2str(valueof(v_updateRequest).primitiveContent.remoteCSE.requestReachability)}; + c_optionalAttribute := {"requestReachability"}; v_cse1.start(f_CSE_REG_UPD_003(v_updateRequest, c_optionalAttribute)); v_cse1.done; } - function f_CSE_REG_UPD_003(template RequestPrimitive p_requestPrimitive, in AttributeAux p_Attribute) runs on CseSimu { + function f_CSE_REG_UPD_003(template RequestPrimitive p_requestPrimitive, in AttributeList p_attribute) runs on CseSimu { // Local variables //Local variables var MsgIn v_response; var RequestPrimitive v_request; var ResourceType v_resourceType := int16; //remoteCSE var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE; - var charstring v_action := "Please, send a valid RETRIEVE Request containing To set to " & PX_CSE1_ADDRESS & " and Content containing remoteCSE resource containing attribute " & p_Attribute.name & " set to " & p_Attribute.value_; + var charstring v_action := "Please, send a valid RETRIEVE Request containing To set to " & PX_CSE1_ADDRESS & " and Content containing remoteCSE resource containing a valid attribute " & p_attribute[0]; // Test control if(not(PICS_MN_CSE)) { @@ -3131,7 +3131,7 @@ module OneM2M_Testcases_CSE { alt { [] mccPort.receive(mw_response(mw_responsePrimitive(int2004, f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Accepted updation for resource type remoteCSE containing attribute " & p_Attribute.name); + setverdict(pass, __SCOPE__ & ": Accepted updation for resource type remoteCSE containing attribute " & p_attribute[0]); f_setResource(v_request.primitiveContent,int16); } [] mccPort.receive(mw_response(mw_responsePrimitiveOK(f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { @@ -3141,12 +3141,12 @@ module OneM2M_Testcases_CSE { } [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Accepted updation for resource type remoteCSE without containing attribute " & p_Attribute.name); + setverdict(fail, __SCOPE__ & ": Accepted updation for resource type remoteCSE without containing attribute " & p_attribute[0]); f_setResource(v_request.primitiveContent,int16); } [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Rejected updation of resource type remoteCSE containing attribute" & p_Attribute.name); + setverdict(fail, __SCOPE__ & ": Rejected updation of resource type remoteCSE containing attribute" & p_attribute[0]); } [] tc_ac.timeout { setverdict(fail, __SCOPE__ & ": No answer while updating resource type remoteCSE"); -- GitLab