Commit af650a87 authored by Naum Spaseski's avatar Naum Spaseski
Browse files

Corrected test cases as demanded in the review

parent b54a7740
...@@ -114,7 +114,6 @@ module OneM2M_Testcases { ...@@ -114,7 +114,6 @@ module OneM2M_Testcases {
var RequestPrimitive v_request; var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1; var integer v_cseBaseIndex := -1;
var integer v_resourceIndex := -1; var integer v_resourceIndex := -1;
var ResourceType v_resourceType := int2; var ResourceType v_resourceType := int2;
//Preambule //Preambule
...@@ -151,23 +150,18 @@ module OneM2M_Testcases { ...@@ -151,23 +150,18 @@ module OneM2M_Testcases {
var M2MResponsePrimitive v_response; var M2MResponsePrimitive v_response;
var RequestPrimitive v_request; var RequestPrimitive v_request;
var integer v_aeIndex := -1; var integer v_cseBaseIndex := -1;
var integer v_resourceIndex := -1;
var ResourceType v_resourceType := int2; var ResourceType v_resourceType := int2;
template RequestPrimitive v_requestPrimitive := m_createAe("APP_ID", omit , "C-AE-ID-STEM");
//Preambule //Preambule
template (value) AccessControlOperations v_allowedOperations := int63; v_cseBaseIndex := f_preamble_prepareCSE({"C-AE-ID-STEM"});//c_CRUDNDi);
v_aeIndex := f_preamble_prepareCSE({"C-AE-ID-STEM"}, v_allowedOperations);//c_CRUDNDi);
//Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));
v_resourceIndex := f_createResource(v_resourceType, v_requestPrimitive, v_aeIndex);
// Test Body v_request := f_getCreateRequestPrimitive(v_resourceType, omit, v_request, v_cseBaseIndex);
v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex)));
v_request.resultContent := int0;//Nothing
mcaPort.send(m_request(v_request)); mcaPort.send(m_request(v_request));
tc_ac.start; tc_ac.start;
alt { alt {
...@@ -193,22 +187,17 @@ module OneM2M_Testcases { ...@@ -193,22 +187,17 @@ module OneM2M_Testcases {
var M2MResponsePrimitive v_response; var M2MResponsePrimitive v_response;
var RequestPrimitive v_request; var RequestPrimitive v_request;
var integer v_aeIndex := -1; var integer v_cseBaseIndex := -1;
var integer v_resourceIndex := -1;
var ResourceType v_resourceType := int2; var ResourceType v_resourceType := int2;
template RequestPrimitive v_requestPrimitive := m_createAe("APP_ID", omit, omit );
//Preambule //Preambule
template (value) AccessControlOperations v_allowedOperations := int63; v_cseBaseIndex := f_preamble_prepareCSE(omit);//c_CRUDNDi);
v_aeIndex := f_preamble_prepareCSE( omit, v_allowedOperations);//c_CRUDNDi);
v_resourceIndex := f_createResource(v_resourceType, v_requestPrimitive, v_aeIndex);
// Test Body // Test Body
v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex))); v_request := valueof(m_createAe(PX_APP_ID, omit, omit));
v_request.resultContent := int0;//Nothing v_request := f_getCreateRequestPrimitive(v_resourceType, omit, v_request, v_cseBaseIndex);
mcaPort.send(m_request(v_request)); mcaPort.send(m_request(v_request));
tc_ac.start; tc_ac.start;
alt { alt {
...@@ -234,22 +223,17 @@ module OneM2M_Testcases { ...@@ -234,22 +223,17 @@ module OneM2M_Testcases {
var M2MResponsePrimitive v_response; var M2MResponsePrimitive v_response;
var RequestPrimitive v_request; var RequestPrimitive v_request;
var integer v_aeIndex := -1; var integer v_cseBaseIndex := -1;
var integer v_resourceIndex := -1;
var ResourceType v_resourceType := int2; var ResourceType v_resourceType := int2;
template RequestPrimitive v_requestPrimitive := m_createAe( "C-AE-ID-STEM", {"APP_ID"}, omit);
//Preambule //Preambule
template (value) AccessControlOperations v_allowedOperations := int63; v_cseBaseIndex := f_preamble_prepareCSE(omit);//c_CRUDNDi);
v_aeIndex := f_preamble_prepareCSE(omit, v_allowedOperations);//c_CRUDNDi);
//Test Body
v_resourceIndex := f_createResource(v_resourceType, v_requestPrimitive, v_aeIndex); v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));
// Test Body v_request := f_getCreateRequestPrimitive(v_resourceType, omit, v_request, v_cseBaseIndex);
v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex)));
v_request.resultContent := int0;//Nothing
mcaPort.send(m_request(v_request)); mcaPort.send(m_request(v_request));
tc_ac.start; tc_ac.start;
alt { alt {
...@@ -275,26 +259,22 @@ module OneM2M_Testcases { ...@@ -275,26 +259,22 @@ module OneM2M_Testcases {
var M2MResponsePrimitive v_response; var M2MResponsePrimitive v_response;
var RequestPrimitive v_request; var RequestPrimitive v_request;
var integer v_aeIndex := -1; var integer v_cseBaseIndex := -1;
var integer v_resourceIndex := -1;
var ResourceType v_resourceType := int2; var ResourceType v_resourceType := int2;
template RequestPrimitive v_requestPrimitive := m_createAe( "APP_ID", omit, omit);
//Preambule //Preambule
template (value) AccessControlOperations v_allowedOperations := int63; v_cseBaseIndex := f_preamble_prepareCSE({"S"});//c_CRUDNDi);
v_aeIndex := f_preamble_prepareCSE({"S"}, v_allowedOperations);//c_CRUDNDi);
//Test Body
v_resourceIndex := f_createResource(v_resourceType, v_requestPrimitive, v_aeIndex); v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));
// Test Body v_request := f_getCreateRequestPrimitive(v_resourceType, omit, v_request, v_cseBaseIndex);
v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex)));
mcaPort.send(m_request(v_request)); mcaPort.send(m_request(v_request));
tc_ac.start; tc_ac.start;
alt { alt {
[] mccPort.receive(mw_request(mw_createAEannc( omit, omit, "APP_ID"))) { [] mccPort.receive(mw_request(mw_createAEannc(omit, omit, "APP_ID"))) {
tc_ac.stop; tc_ac.stop;
setverdict(pass, testcasename() & ": AE creation redirected."); setverdict(pass, testcasename() & ": AE creation redirected.");
} }
......
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