Commit bf348779 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

TC_CSE_REG_DEL_006 and TC_CSE_REG_DEL_007 implemented


Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 7f689b92
...@@ -3286,6 +3286,164 @@ module OneM2M_Testcases_CSE_Release_1 { ...@@ -3286,6 +3286,164 @@ module OneM2M_Testcases_CSE_Release_1 {
}//end TC_CSE_REG_DEL_005 }//end TC_CSE_REG_DEL_005
/**
* @desc Check that the IUT accepts an AE de-registration when AE-ID is starting with “S”
*
*/
testcase TC_CSE_REG_DEL_006() runs on Tester system CseSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_cse1.start(f_CSE_REG_DEL_006());
v_cse1.done;
}
function f_CSE_REG_DEL_006() runs on CseSimu {
var RequestPrimitive v_request;
var template RequestPrimitive v_updateAeAnnc := mw_updateAEAnnc;
var integer v_cseBaseIndex := -1;
var integer v_aeIndex := -1;
var integer v_aeIndex_ae1 := -1;
var integer v_aeAnncIndex := -1;
var ResourceType v_resourceType := int2;
//Test control
if(not(PICS_MN_CSE)) {
setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE to run this test case");
stop;
}
// Test component configuration
f_cf02UpCseSimuMaster(int1);
//Preamble
vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSE);
vc_ae1.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, "S")));
v_aeAnncIndex := f_cse_announcementProcedure_createHandler(-, -, -);
f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
v_aeIndex_ae1 := f_getLatestResourceIndex(vc_ae1);
v_aeIndex := f_getLatestResource(vc_ae1);
//Test Body
vc_ae1.start(f_cse_deleteResource(v_aeIndex_ae1));
v_updateAeAnnc.primitiveContent.aEAnnc.link := "INACTIVE";
tc_ac.start;
alt {
[] mccPortIn.receive(mw_request(v_updateAeAnnc)) -> value vc_request {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": AE Announced UPDATE received");
f_processUpdateRequestPrimitive(vc_request.primitive.requestPrimitive);
mccPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
}
[] mccPortIn.receive(mw_request(mw_update)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong UPDATE request received ");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while creating AE");
}
}
f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
// Postamble
f_cse_postamble_deleteResourcesCSE();
// Tear down
f_cf02DownCseSimuMaster();
}
/**
* @desc Check that the IUT accepts the response from IN-CSE for the AE de-registration when AE-ID is starting with “S”
*
*/
testcase TC_CSE_REG_DEL_007() runs on Tester system CseSystem {
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
v_ae1.done;
v_ae1.start(f_CSE_REG_DEL_007());
v_ae1.done;
}
function f_CSE_REG_DEL_007() runs on AeSimu {
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var template RequestPrimitive v_updateAeAnnc := mw_updateAEAnnc;
//Test control
if(not(PICS_MN_CSE)) {
setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE to run this test case");
stop;
}
// Test component configuration
f_cf02Up();
//Preamble
vc_cse1.start(f_cse_registrationRemoteCse(mw_createRemoteCSE));
vc_cse1.done;
v_aeIndex := f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, "S"));
vc_cse1.start(f_cse_announcementProcedure_createHandler());
f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
v_updateAeAnnc.primitiveContent.aEAnnc.link := "INACTIVE";
vc_cse1.start(f_cse_announcementProcedure_updateHandler(v_updateAeAnnc));
v_request := valueof(m_delete(f_getResourceAddress(v_aeIndex), f_getOriginator(v_aeIndex)));
mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
//Test Body
f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": AE resource deleted successfully.");
}
[] mcaPortIn.receive(mw_response(mw_responsePrimitive(?))) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while deleting AE resource");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while deleting AE resource");
}
}
//Check to see if the resource is present or not
if (not(f_cse_isResourcePresent(v_aeIndex))) {
setverdict(pass, __SCOPE__ & ":INFO: Resource deleted");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource not deleted");
}
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf02Down();
}; //end TC_CSE_REG_DEL_007
}// end group Delete }// end group Delete
}//end Registration }//end Registration
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment