TC_CSE_DMR_CRE_018_RCN_xxx implemented

Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 1474938b
...@@ -2916,7 +2916,56 @@ module OneM2M_PermutationFunctions { ...@@ -2916,7 +2916,56 @@ module OneM2M_PermutationFunctions {
f_cf01Down(); f_cf01Down();
}//end f_CSE_DMR_CRE_017 }//end f_CSE_DMR_CRE_017
function f_CSE_DMR_CRE_018(ResultContent p_resultContent) runs on AeSimu {
// Local variables
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
// Test control
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
// Test Body
v_request := f_getCreateRequestPrimitive(int3, m_createContainerBase, v_aeIndex);
v_request.resultContent := p_resultContent;
mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
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)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error, Result content set to " & int2str(enum2int(p_resultContent)) & " is impossible for a retrieve request ");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
}
}
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}//end f_CSE_DMR_CRE_018
function f_CSE_DMR_CRE_019(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on CseSimu{ function f_CSE_DMR_CRE_019(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on CseSimu{
// Local variables // Local variables
......
...@@ -775,7 +775,48 @@ module OneM2M_Testcases_CSE_Release_2 { ...@@ -775,7 +775,48 @@ module OneM2M_Testcases_CSE_Release_2 {
} }
} // end g_CSE_DMR_CRE_017 } // end g_CSE_DMR_CRE_017
group g_CSE_DMR_CRE_018 {
/**
* @desc Check that the IUT rejects a CREATE request when the ResultContent is set to RESULT_CONTENT
*
*/
testcase TC_CSE_DMR_CRE_018_RCN_4() runs on Tester system CseSystem {
// Local variables
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_DMR_CRE_018(int4));//ResultContent = 4 (attributes and child resources)
v_ae1.done;
}
testcase TC_CSE_DMR_CRE_018_RCN_5() runs on Tester system CseSystem {
// Local variables
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_DMR_CRE_018(int5));//ResultContent = 5 (attributes and child resources references)
v_ae1.done;
}
testcase TC_CSE_DMR_CRE_018_RCN_6() runs on Tester system CseSystem {
// Local variables
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_DMR_CRE_018(int6));//ResultContent = 6 (child resources references)
v_ae1.done;
}
testcase TC_CSE_DMR_CRE_018_RCN_8() runs on Tester system CseSystem {
// Local variables
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_DMR_CRE_018(int8));//ResultContent = 8 (child resources)
v_ae1.done;
}
} // end g_CSE_DMR_CRE_018
}//end group Create }//end group Create
group Retrieve { group Retrieve {
......
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