From 3b6e230f1e3eb48eab2e631d4f52b6eac9cbb85e Mon Sep 17 00:00:00 2001 From: reinaortega <miguelangel.reinaortega@etsi.org> Date: Thu, 21 Mar 2019 15:28:14 +0100 Subject: [PATCH] Review and clean up of TC_CSE_REG_CRE_006 Signed-off-by: reinaortega <miguelangel.reinaortega@etsi.org> --- OneM2M_Testcases_CSE_Release_1.ttcn | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/OneM2M_Testcases_CSE_Release_1.ttcn b/OneM2M_Testcases_CSE_Release_1.ttcn index c1338ed..50b59ed 100644 --- a/OneM2M_Testcases_CSE_Release_1.ttcn +++ b/OneM2M_Testcases_CSE_Release_1.ttcn @@ -752,9 +752,11 @@ module OneM2M_Testcases_CSE_Release_1 { function f_CSE_REG_CRE_006() runs on CseSimu { - var RequestPrimitive v_request; + var MsgIn v_request; + var template RequestPrimitive v_requestPrimitive; var integer v_cseBaseIndex := -1; - var ResourceType v_resourceType := int2; + const charstring v_cseId := PX_CSE_ID; + template XSD.AnyURI v_link := pattern "{v_cseId}/?*"; //Test control if(not(PICS_MN_CSE or PICS_ASN_CSE)) { @@ -763,27 +765,36 @@ module OneM2M_Testcases_CSE_Release_1 { } // Test component configuration - f_cf02UpCseSimuMaster(); + f_cf02UpCseSimuMaster(int1); //Preamble vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSE); //Test Body - vc_ae1.start(f_cse_sendCreateRequestPrimitive(int2, m_createAe(PX_APP_ID, omit, "S"))); - vc_ae1.done; - + vc_ae1.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, -, "S"))); + + v_requestPrimitive := mw_createAEAnnc_s_ae_id(PX_CSE_ID & "/S", -, -, v_link); + tc_ac.start; alt { - [] mccPortIn.receive(mw_request(mw_createAEAnnc_s_ae_id(PX_CSE_ID, f_getLocalResourceAddress(vc_cSEBaseIndex), -))) { + [] mccPortIn.receive(mw_request(v_requestPrimitive)) -> value v_request { tc_ac.stop; setverdict(pass, __SCOPE__ & ": AE creation redirected."); + f_cse_sendResponse_cseSimu(v_request); + } + [] mccPortIn.receive(mw_request(mw_createAEAnnc())) -> value v_request { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": AE creation redirected but wrong parameters"); + f_cse_sendResponse_cseSimu(v_request); } [] tc_ac.timeout { setverdict(fail, __SCOPE__ & ": No answer while creating AE"); } } + vc_ae1.done; + // Postamble f_cse_postamble_deleteResourcesCSE(); -- GitLab