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

TC_CSE_REG_CRE_020 implemented


Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent bf348779
...@@ -1494,6 +1494,83 @@ module OneM2M_Testcases_CSE_Release_1 { ...@@ -1494,6 +1494,83 @@ module OneM2M_Testcases_CSE_Release_1 {
}//end TC_CSE_REG_CRE_019 }//end TC_CSE_REG_CRE_019
/**
* @desc Check that the IUT accepts a create request of <AE> resource with attributes multiplicity equals to 1 and asking AE_ID_Stem by indicating AE_ID_Stem starting with character ‘S’.
*
*/
testcase TC_CSE_REG_CRE_020() 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_CRE_020());
v_ae1.done;
}
function f_CSE_REG_CRE_020() runs on AeSimu {
//Local variables
var RequestPrimitive v_request;
var ResourceType v_resourceType := int2;
//Test control
if(not(PICS_IN_CSE)) {
setverdict(inconc, __SCOPE__ & ": IUT shall be IN-CSE to run this test case");
stop;
}
// Test component configuration
f_cf01Up();
//Preamble
//Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, "S"));
v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1);
mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value vc_response {
tc_ac.stop;
f_checkAttributesToBeSaved(int2, v_request, vc_response.primitive.responsePrimitive);
vc_aeAuxIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, int2);
setverdict(pass, __SCOPE__ & ": AE successfully created.");
if(ischosen(vc_response.primitive.responsePrimitive.primitiveContent.aE)) {
if(ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aE.resourceID)) {
if(f_resourceIdCleaner(vc_response.primitive.responsePrimitive.primitiveContent.aE.resourceID[0]) != "S") {
setverdict(fail, __SCOPE__ & ": ResourceID not starting with 'S'");
}
} else {
setverdict(fail, __SCOPE__ & ": ResourceID attribute not present");
}
} else {
setverdict(fail, __SCOPE__ & ": AE resource representation not present");
}
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value vc_response{
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while creating AE with status code " & int2str(enum2int(vc_response.primitive.responsePrimitive.responseStatusCode)));
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while creating AE");
}
}
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}
/** /**
* @desc Check that the IUT rejects the create request of <CSEBase> resource. * @desc Check that the IUT rejects the create request of <CSEBase> resource.
* *
......
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