Improving AE_DMR_DEL group

Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent e43d0c79
......@@ -1693,7 +1693,7 @@ module OneM2M_Testcases_AE_Release_1 {
var template UtTriggerPrimitive v_utRequest := m_utDelete;
var MsgIn v_request;
var ResponsePrimitive v_responsePrimitive;
var universal charstring v_action := __SCOPE__ & ": Please, send a valid DELETE Request for deleting the 'oldest' attribute from contentInstance";
var universal charstring v_action := __SCOPE__ & ": Please, send a valid DELETE Request for deleting the 'oldest' resource from container to ";
//Test component configuration
f_cf03Up();
......@@ -1702,14 +1702,14 @@ module OneM2M_Testcases_AE_Release_1 {
v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex) & "/" & c_resourceShortNameOldest;
f_sendUtPrimitive(v_utRequest,v_action);
f_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_resourceIndex));
//Test behavior
tc_ac.start;
alt{
[] mcaPortIn.receive(mw_request(mw_delete(v_utRequest.requestPrimitive.to_))) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : delete attribute oldest request is accepted!!");
setverdict(pass, __SCOPE__, " : Delete oldest ContentInstance resource is accepted");
//set responseStatusCode back to SUT
v_responsePrimitive := valueof(m_responsePrimitive(int2002, v_request.primitive.requestPrimitive.requestIdentifier, omit));
......@@ -1718,9 +1718,9 @@ module OneM2M_Testcases_AE_Release_1 {
mcaPortIn.send(f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
tc_ac.stop;
}
[] mcaPortIn.receive {
[] mcaPortIn.receive (mw_request(mw_delete(?))) {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : error while deleting attribute !");
setverdict(fail, __SCOPE__, " : Delete request for unexpected target");
}
[] tc_ac.timeout{
setverdict(fail, __SCOPE__, " : Timeout due to no response received from requested SUT!");
......@@ -1755,7 +1755,7 @@ module OneM2M_Testcases_AE_Release_1 {
var template UtTriggerPrimitive v_utRequest := m_utDelete;
var MsgIn v_request;
var ResponsePrimitive v_responsePrimitive;
var universal charstring v_action := __SCOPE__ & ": Please, send a valid DELETE Request for deleting the 'latest' attribute from contentInstance";
var universal charstring v_action := __SCOPE__ & ": Please, send a valid DELETE Request for deleting the 'latest' resource from container to ";
//Test component configuration
f_cf03Up();
......@@ -1764,14 +1764,14 @@ module OneM2M_Testcases_AE_Release_1 {
v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex) & "/" & c_resourceShortNameLatest;
f_sendUtPrimitive(v_utRequest,v_action);
f_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_resourceIndex));
//Test behavior
tc_ac.start;
alt{
[] mcaPortIn.receive(mw_request(mw_delete(v_utRequest.requestPrimitive.to_))) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : delete attribute latest request is accepted!!");
setverdict(pass, __SCOPE__, " : delete attribute latest resource ContentInstance is accepted");
//set responseStatusCode back to SUT
v_responsePrimitive := valueof(m_responsePrimitive(int2002, v_request.primitive.requestPrimitive.requestIdentifier, omit));
......@@ -1780,9 +1780,9 @@ module OneM2M_Testcases_AE_Release_1 {
mcaPortIn.send(f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
tc_ac.stop;
}
[] mcaPortIn.receive {
[] mcaPortIn.receive (mw_request(mw_delete(?))) {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : error while deleting attribute !");
setverdict(fail, __SCOPE__, " : Delete request for unexpected target");
}
[] tc_ac.timeout{
setverdict(fail, __SCOPE__, " : Timeout due to no response received from requested SUT!");
......@@ -1817,7 +1817,7 @@ module OneM2M_Testcases_AE_Release_1 {
var template UtTriggerPrimitive v_utRequest := m_utDelete;
var MsgIn v_request;
var ResponsePrimitive v_responsePrimitive;
var universal charstring v_action := __SCOPE__ & ": Please, send a valid DELETE Request for deleting the container resource";
var universal charstring v_action := __SCOPE__ & ": Please, send a valid DELETE Request for deleting the container resource to ";
//Test component configuration
f_cf03Up();
......@@ -1826,7 +1826,7 @@ module OneM2M_Testcases_AE_Release_1 {
v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex);
f_sendUtPrimitive(v_utRequest,v_action);
f_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_resourceIndex));
//Test behavior
tc_ac.start;
......@@ -1842,9 +1842,9 @@ module OneM2M_Testcases_AE_Release_1 {
mcaPortIn.send(f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
tc_ac.stop;
}
[] mcaPortIn.receive {
[] mcaPortIn.receive (mw_request(mw_delete(?))) {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : error while deleting resource !");
setverdict(fail, __SCOPE__, " : Delete request for unexpected target");
}
[] tc_ac.timeout{
setverdict(fail, __SCOPE__, " : Timeout due to no response received from requested SUT!");
......@@ -1872,23 +1872,25 @@ module OneM2M_Testcases_AE_Release_1 {
function f_AE_DMR_DEL_004() runs on CseSimu {
var integer v_resourceIndex := -1;
var integer v_resourceIndex, v_containerResourceIndex := -1;
var PrimitiveContent v_localResource;
//variables
var template UtTriggerPrimitive v_utRequest := m_utDelete;
var MsgIn v_request;
var ResponsePrimitive v_responsePrimitive;
var universal charstring v_action := __SCOPE__ & ": Please, send a valid DELETE Request for deleting the contentInstance resource";
var universal charstring v_action := __SCOPE__ & ": Please, send a valid DELETE Request for deleting the contentInstance resource to ";
//Test component configuration
f_cf03Up();
//send triggering primitive to SUT
v_localResource := f_generateLocalResource(valueof(m_primitiveContentContentInstance(m_contentCreateContentInstance)), vc_cSEBaseIndex, int4);
v_resourceIndex := f_setLocalResource(v_localResource, int4, vc_cSEBaseIndex);
v_containerResourceIndex := f_setLocalResource(v_localResource, int4, vc_cSEBaseIndex);
v_localResource := f_generateLocalResource(valueof(m_primitiveContentContentInstance(m_contentCreateContentInstance)), v_resourceIndex, int4);
v_resourceIndex := f_setLocalResource(v_localResource, int4, v_containerResourceIndex);
v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex);
f_sendUtPrimitive(v_utRequest,v_action);
f_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_resourceIndex));
//Test behavior
tc_ac.start;
......@@ -1904,9 +1906,9 @@ module OneM2M_Testcases_AE_Release_1 {
mcaPortIn.send(f_getMsgOutPrimitive(m_response(v_responsePrimitive)));
tc_ac.stop;
}
[] mcaPortIn.receive {
[] mcaPortIn.receive (mw_request(mw_delete(?))) {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : error while deleting resource !");
setverdict(fail, __SCOPE__, " : Delete request for unexpected target");
}
[] tc_ac.timeout{
setverdict(fail, __SCOPE__, " : Timeout due to no response received from requested SUT!");
......
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