Commit e5a9c9aa authored by Pramod Kulkarni's avatar Pramod Kulkarni
Browse files

Implemented REG/RET/010 TC


Signed-off-by: Pramod Kulkarni's avatarpkulkarni <pkulkarni75@gmail.com>
parent e67bca78
......@@ -2478,6 +2478,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
......@@ -2507,7 +2511,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();
......@@ -2516,7 +2532,66 @@ module OneM2M_Testcases_CSE {
}//end TC_CSE_REG_RET_009
} //end group Retrieve
/**
* @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
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