Registration Create group

Signed-off-by: Antonio Castillo Verdugo's avataracverdugo <acverdugo@at4wireless.com>
parent 3988731d
......@@ -1476,51 +1476,76 @@ module OneM2M_Testcases_CSE {
* @desc Check that the IUT rejects a create request of <AE> resource that doesn’t include the MANDATORY_ATTRIBUTE
*
*/
testcase TC_CSE_REG_CRE_021() runs on AeSimu system CseSystem {
group g_CSE_REG_CRE_021 {
testcase TC_CSE_REG_CRE_021_API() runs on Tester system CseSystem {
//Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createAe(PX_APP_ID);
v_createRequest.primitiveContent.aE.app_ID := omit; //Mandatory app_ID field is being set empty
v_ae1.start(f_CSE_REG_CRE_021(v_createRequest));
v_ae1.done;
}//end TC_CSE_REG_CRE_021_API
testcase TC_CSE_REG_CRE_021_RR() runs on Tester system CseSystem {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createAe(PX_APP_ID);
v_createRequest.primitiveContent.aE.requestReachability := omit; //Mandatory requestReachability field is being set empty
v_ae1.start(f_CSE_REG_CRE_021(v_createRequest));
v_ae1.done;
// Local variables
var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
// Test control
}//end TC_CSE_REG_CRE_021_RR
function f_CSE_REG_CRE_021(template RequestPrimitive p_createRequestPrimitive) runs on AeSimu {
//Local variables
var ResourceType v_resourceType := int2;
// Test control
// Test component configuration
f_cf01Up();
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Test adapter configuration
// Preamble
kk
// Test Body
f_cse_createResource(int2, m_createAe(omit, omit, omit)); //Mandatory app_ID field is being set empty
// Preamble
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) { //BAD REQUEST
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Request successfully rejected");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)){
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error, AE has been registered");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
}
}
// Test Body
f_cse_createResource(v_resourceType, p_createRequestPrimitive);
// Postamble
f_cse_postamble_deleteResources();
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) { //BAD REQUEST
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Request successfully rejected");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)){
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error, AE has been registered");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
}
}
// Tear down
f_cf01Down();
// Postamble
f_cse_postamble_deleteResources();
}//end TC_CSE_REG_CRE_027
// Tear down
f_cf01Down();
}
}//end g_CSE_REG_CRE_021
/**
* @desc Check that the IUT accepts an create request of <remoteCSE> resource with attributes multiplicity equals to 1.
......
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