Commit 700c634b authored by Naum Spaseski's avatar Naum Spaseski

Merge branch 'STF531-REG-TCs' of https://git.onem2m.org/TST/ATS into STF531-REG-TCs

parents dfa92c30 40db3605
......@@ -2468,6 +2468,10 @@ module OneM2M_Testcases_CSE {
}//end TC_CSE_REG_RET_008
/**
* @desc Check that the IUT sends a <remoteCSE> retrieve request on TARGET_REMOTE_CSE_ADDRESS
*
*/
testcase TC_CSE_REG_RET_009() runs on CseSimu system CseSystem {
//Local variables
//Local variables
......@@ -2497,7 +2501,19 @@ module OneM2M_Testcases_CSE {
f_sendUtPrimitive(v_utRequest);
tc_ac.start;
mccPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(vc_remoteCseIndex))));
alt {
[] mccPort.receive(mw_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(vc_remoteCseIndex)))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Retrieve Request received successfully");
}
[] mccPort.receive {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error Retrieve request was not received");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while waiting to receive Retrieve request");
}
}
// Postamble
f_cse_postamble_deleteResourcesCSE();
......@@ -2505,8 +2521,67 @@ module OneM2M_Testcases_CSE {
f_cf04Down();
}//end TC_CSE_REG_RET_009
/**
* @desc Check that IUT accepts a <remoteCSE> retrieve request
*
*/
testcase TC_CSE_REG_RET_010() runs on CseSimu system CseSystem {
//Local variables
var MsgIn v_response;
var RequestPrimitive v_request;
var ResourceType v_resourceType := int16; //remoteCSE
var template PrimitiveContent v_contentResponse;
var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE;
// 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_cf04Up();
// Test adapter configuration
// Preamble
vc_remoteCseIndex := f_cse_registrationRemoteCse(m_createRemoteCSEBase);
v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
mccPort.send(m_request(m_retrieveResource(f_getResourceAddress(), f_getOriginator(vc_remoteCseIndex))));
tc_ac.start;
alt {
[] mccPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponse))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Response OK for retrieving");
}
[] mccPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
[] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements");
}
[] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while retrieving resource");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
}
}
// Postamble
f_cse_postamble_deleteResourcesCSE();
// Tear down
f_cf04Down();
}//end TC_CSE_REG_RET_010
} //end group Retrieve
}//end group Retrieve
group Update{
......
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