Skip to content
Snippets Groups Projects
Commit af650a87 authored by Naum Spaseski's avatar Naum Spaseski
Browse files

Corrected test cases as demanded in the review

parent b54a7740
No related branches found
No related tags found
1 merge request!3Reg
......@@ -114,7 +114,6 @@ module OneM2M_Testcases {
var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1;
var integer v_resourceIndex := -1;
var ResourceType v_resourceType := int2;
//Preambule
......@@ -151,23 +150,18 @@ module OneM2M_Testcases {
var M2MResponsePrimitive v_response;
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
template RequestPrimitive v_requestPrimitive := m_createAe("APP_ID", omit , "C-AE-ID-STEM");
//Preambule
template (value) AccessControlOperations v_allowedOperations := int63;
v_aeIndex := f_preamble_prepareCSE({"C-AE-ID-STEM"}, v_allowedOperations);//c_CRUDNDi);
v_resourceIndex := f_createResource(v_resourceType, v_requestPrimitive, v_aeIndex);
v_cseBaseIndex := f_preamble_prepareCSE({"C-AE-ID-STEM"});//c_CRUDNDi);
//Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));
// Test Body
v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex)));
v_request.resultContent := int0;//Nothing
v_request := f_getCreateRequestPrimitive(v_resourceType, omit, v_request, v_cseBaseIndex);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
......@@ -193,22 +187,17 @@ module OneM2M_Testcases {
var M2MResponsePrimitive v_response;
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
template RequestPrimitive v_requestPrimitive := m_createAe("APP_ID", omit, omit );
//Preambule
template (value) AccessControlOperations v_allowedOperations := int63;
v_aeIndex := f_preamble_prepareCSE( omit, v_allowedOperations);//c_CRUDNDi);
v_resourceIndex := f_createResource(v_resourceType, v_requestPrimitive, v_aeIndex);
v_cseBaseIndex := f_preamble_prepareCSE(omit);//c_CRUDNDi);
// Test Body
v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex)));
v_request.resultContent := int0;//Nothing
v_request := valueof(m_createAe(PX_APP_ID, omit, omit));
v_request := f_getCreateRequestPrimitive(v_resourceType, omit, v_request, v_cseBaseIndex);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
......@@ -234,22 +223,17 @@ module OneM2M_Testcases {
var M2MResponsePrimitive v_response;
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
template RequestPrimitive v_requestPrimitive := m_createAe( "C-AE-ID-STEM", {"APP_ID"}, omit);
//Preambule
template (value) AccessControlOperations v_allowedOperations := int63;
v_aeIndex := f_preamble_prepareCSE(omit, v_allowedOperations);//c_CRUDNDi);
v_cseBaseIndex := f_preamble_prepareCSE(omit);//c_CRUDNDi);
v_resourceIndex := f_createResource(v_resourceType, v_requestPrimitive, v_aeIndex);
//Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));
// Test Body
v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex)));
v_request.resultContent := int0;//Nothing
v_request := f_getCreateRequestPrimitive(v_resourceType, omit, v_request, v_cseBaseIndex);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
......@@ -275,26 +259,22 @@ module OneM2M_Testcases {
var M2MResponsePrimitive v_response;
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
template RequestPrimitive v_requestPrimitive := m_createAe( "APP_ID", omit, omit);
//Preambule
template (value) AccessControlOperations v_allowedOperations := int63;
v_aeIndex := f_preamble_prepareCSE({"S"}, v_allowedOperations);//c_CRUDNDi);
v_cseBaseIndex := f_preamble_prepareCSE({"S"});//c_CRUDNDi);
v_resourceIndex := f_createResource(v_resourceType, v_requestPrimitive, v_aeIndex);
//Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));
// Test Body
v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex)));
v_request := f_getCreateRequestPrimitive(v_resourceType, omit, v_request, v_cseBaseIndex);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mccPort.receive(mw_request(mw_createAEannc( omit, omit, "APP_ID"))) {
[] mccPort.receive(mw_request(mw_createAEannc(omit, omit, "APP_ID"))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": AE creation redirected.");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment