Skip to content
Snippets Groups Projects
Commit dde6b88e authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Review of added code + addition of f_checkCseTesterStatus

parent 57c8683b
No related branches found
No related tags found
2 merge requests!25Ae fixes,!20Stf531 check tpreq ttcn
......@@ -2908,6 +2908,7 @@ module OneM2M_Testcases {
}
f_checkCseTesterStatus();
//Check to see if the resource has been created
if (f_isResourceCreated(v_resourceIndex)){
setverdict(pass, testcasename() & "Resource created");
......@@ -3076,6 +3077,8 @@ module OneM2M_Testcases {
}
}
f_checkCseTesterStatus();
//Check to see if the resource has been created
if(f_isResourceCreated(v_resourceIndex)){
setverdict(pass, testcasename() & "Resource created");
......@@ -3280,6 +3283,8 @@ module OneM2M_Testcases {
setverdict(inconc, testcasename() & ": No answer while creating resource");
}
}
f_checkCseTesterStatus();
//Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
......@@ -3375,12 +3380,15 @@ module OneM2M_Testcases {
}
}
//Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created");
} else {
setverdict(fail, testcasename() & "Resource created");
}
f_checkCseTesterStatus();
//Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created");
} else {
setverdict(fail, testcasename() & "Resource created");
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -3474,6 +3482,8 @@ module OneM2M_Testcases {
setverdict(inconc, testcasename() & ": No answer while creating resource type " & int2str(enum2int(p_resourceType)));
}
}
f_checkCseTesterStatus();
//Check to see if the resource has been created
if(f_isResourceCreated(v_resourceIndex)){
......@@ -3542,13 +3552,15 @@ module OneM2M_Testcases {
}
}
f_checkCseTesterStatus();
//Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_containerIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created");
setverdict(pass, testcasename() & "Resource not created");
} else {
setverdict(fail, testcasename() & "Resource created");
setverdict(fail, testcasename() & "Resource created");
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -3569,7 +3581,6 @@ module OneM2M_Testcases {
var integer v_aeIndex := -1;
var integer v_containerIndex := -1;
const integer c_maxByteSize := 0;
var integer v_resourceIndex := -1;
// Test control
// Test component configuration
......@@ -3593,7 +3604,6 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int5207))) -> value v_response {
tc_ac.stop;
setverdict(pass, testcasename() & ": Maximun byte size exceeded");
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, v_containerIndex);
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
......@@ -3610,8 +3620,10 @@ module OneM2M_Testcases {
}
}
f_checkCseTesterStatus();
//Check to see if the resource has been created or not
if(f_isResourceCreated(v_resourceIndex)){
if(f_isResourceNotCreated(v_containerIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource created");
} else {
setverdict(fail, testcasename() & "Resource not created");
......@@ -3741,11 +3753,13 @@ module OneM2M_Testcases {
}
}
f_checkCseTesterStatus();
//Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_containerIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created");
setverdict(pass, testcasename() & "Resource not created");
} else {
setverdict(fail, testcasename() & "Resource created");
setverdict(fail, testcasename() & "Resource created");
}
// Postamble
......@@ -3808,11 +3822,13 @@ module OneM2M_Testcases {
}
}
f_checkCseTesterStatus();
//Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_containerIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created");
setverdict(pass, testcasename() & "Resource not created");
} else {
setverdict(fail, testcasename() & "Resource created");
setverdict(fail, testcasename() & "Resource created");
}
// Postamble
......@@ -4531,6 +4547,8 @@ module OneM2M_Testcases {
setverdict(fail, testcasename() & ": No answer while creating resource type " & int2str(enum2int(p_resourceType)));
}
}
f_checkCseTesterStatus();
//Check to see if the resource has been created or not
if(f_isResourceCreated(v_resourceIndex)) {
......@@ -9388,7 +9406,7 @@ module OneM2M_Testcases {
testcase TC_CSE_LOC_BV_001() runs on CseTester system CseSystem {
var integer v_aeAuxIndex := -1;
var integer v_aeIndex := -1;
var RequestPrimitive v_request;
var MsgIn v_response;
var LocationSource v_locationSource := int1;//Network-based
......@@ -9397,10 +9415,10 @@ module OneM2M_Testcases {
f_cf01Up();
//Preamble
v_aeAuxIndex := f_cse_preamble_registerAe();
v_aeIndex := f_cse_preamble_registerAe();
//Set requestPrimitive
v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, omit, omit, omit), v_aeAuxIndex);
v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, omit, omit, omit), v_aeIndex);
//Test Body
mcaPort.send(m_request(v_request));
......@@ -9424,12 +9442,15 @@ module OneM2M_Testcases {
}
f_checkCseTesterStatus();
//Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_aeAuxIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource <locationPolicy> not created");
if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created");
} else {
setverdict(fail, testcasename() & "Resource <locationPolicy> created");
setverdict(fail, testcasename() & "Resource created");
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -9479,10 +9500,13 @@ module OneM2M_Testcases {
}
}
if(f_isResourceCreated(v_resourceIndex)){
setverdict(pass, testcasename() & "Resource locationPolicy created");
f_checkCseTesterStatus();
//Check to see if the resource has been created or not
if(f_isResourceCreated(v_resourceIndex)) {
setverdict(pass, testcasename() & "Resource created");
} else {
setverdict(fail, testcasename() & "Resource locationPolicy not created");
setverdict(fail, testcasename() & "Resource not created");
}
// Postamble
......@@ -9500,7 +9524,7 @@ module OneM2M_Testcases {
testcase TC_CSE_LOC_BO_003() runs on CseTester system CseSystem {//the originator has no privileges to create a locationPolicy resource!!
var integer v_aeAuxIndex := -1;
var integer v_aeIndex := -1;
var integer v_acpAuxIndex := -1;
var LocationSource v_locationSource := int1;//Network-based
var XSD.Duration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD;
......@@ -9521,10 +9545,10 @@ module OneM2M_Testcases {
//Preamble
v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int62);//c_RUDNDi) //No resource creation privilege
v_aeAuxIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
//Set requestPrimitive
v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource,omit, locationUpdatePeriod, locationTargetID, locationServerAddress), v_aeAuxIndex);
v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource,omit, locationUpdatePeriod, locationTargetID, locationServerAddress), v_aeIndex);
// Test Body
mcaPort.send(m_request(v_request));
......@@ -9543,10 +9567,13 @@ module OneM2M_Testcases {
}
}
if(f_isResourceNotCreated(v_aeAuxIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created");
f_checkCseTesterStatus();
//Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created");
} else {
setverdict(fail, testcasename() & "Resource created");
setverdict(fail, testcasename() & "Resource created");
}
// Postamble
......@@ -9563,7 +9590,7 @@ module OneM2M_Testcases {
group g_CSE_LOC_BO_004{
testcase TC_CSE_LOC_BO_004() runs on CseTester system CseSystem {
var integer v_aeAuxIndex := -1;
var integer v_aeIndex := -1;
var LocationSource v_locationSource := int1;//Netwok-based
var XSD.Duration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD;
var XSD.Token locationTargetID := PX_LOCATION_TARGET_ID;
......@@ -9575,10 +9602,10 @@ module OneM2M_Testcases {
f_cf01Up();
//Preamble
v_aeAuxIndex := f_cse_preamble_registerAe();
v_aeIndex := f_cse_preamble_registerAe();
//Set requestPrimitive
v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress), v_aeAuxIndex);
v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(v_locationSource, omit, locationUpdatePeriod, locationTargetID, locationServerAddress), v_aeIndex);
// Test Body
mcaPort.send(m_request(v_request));
......@@ -9597,11 +9624,13 @@ module OneM2M_Testcases {
}
}
f_checkCseTesterStatus();
//Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_aeAuxIndex, f_getResourceName(v_request.primitiveContent))) {
setverdict(pass, testcasename() & "Resource not created");
if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created");
} else {
setverdict(fail, testcasename() & "Resource created");
setverdict(fail, testcasename() & "Resource created");
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -9660,7 +9689,10 @@ module OneM2M_Testcases {
}
}
if(f_isResourceCreated(v_resourceIndex)){
f_checkCseTesterStatus();
//Check to see if the resource has been created or not
if(f_isResourceCreated(v_resourceIndex)) {
setverdict(pass, testcasename() & "Resource created");
} else {
setverdict(fail, testcasename() & "Resource not created");
......@@ -9732,10 +9764,13 @@ module OneM2M_Testcases {
}
if(f_isResourceCreated(v_resourceIndex)){
setverdict(pass, testcasename() & "Resource created");
f_checkCseTesterStatus();
//Check to see if the resource has been created or not
if(f_isResourceCreated(v_resourceIndex)) {
setverdict(pass, testcasename() & "Resource created");
} else {
setverdict(fail, testcasename() & "Resource not created");
setverdict(fail, testcasename() & "Resource not created");
}
// Postamble
......@@ -9788,7 +9823,10 @@ module OneM2M_Testcases {
}
}
if(f_isResourceCreated(v_resourceIndex)){
f_checkCseTesterStatus();
//Check to see if the resource has been created or not
if(f_isResourceCreated(v_resourceIndex)) {
setverdict(pass, testcasename() & "Resource created");
} else {
setverdict(fail, testcasename() & "Resource not created");
......@@ -9845,6 +9883,9 @@ module OneM2M_Testcases {
}
}
f_checkCseTesterStatus();
//Check to see if the resource has been created or not
if(f_isResourceCreated(v_resourceIndex)) {
setverdict(pass, testcasename() & "Resource created");
} else {
......@@ -10249,11 +10290,13 @@ module OneM2M_Testcases {
}
}
f_checkCseTesterStatus();
//Check to see if the resource has NOT been created
if (f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & ": Resource not created");
if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created");
} else {
setverdict(fail, testcasename() & ": Resource created");
setverdict(fail, testcasename() & "Resource created");
}
......@@ -10327,12 +10370,15 @@ module OneM2M_Testcases {
}
}
f_checkCseTesterStatus();
//Check to see if the resource has NOT been created
if (f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & ": Resource not created");
if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created");
} else {
setverdict(fail, testcasename() & ": Resource created");
}
setverdict(fail, testcasename() & "Resource created");
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -12542,13 +12588,15 @@ module OneM2M_Testcases {
}
}
//Check to see if the resource has been created or not
f_checkCseTesterStatus();
//Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_resourceIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created");
setverdict(pass, testcasename() & "Resource not created");
} else {
setverdict(fail, testcasename() & "Resource created");
setverdict(fail, testcasename() & "Resource created");
}
//Postamble
f_cse_postamble_deleteResources();
......@@ -12604,11 +12652,13 @@ module OneM2M_Testcases {
}
}
//Check to see if the resource has been created or not
f_checkCseTesterStatus();
//Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_contentInstanceResourceIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created");
setverdict(pass, testcasename() & "Resource not created");
} else {
setverdict(fail, testcasename() & "Resource created");
setverdict(fail, testcasename() & "Resource created");
}
//Postamble
......@@ -12674,11 +12724,13 @@ module OneM2M_Testcases {
}
}
//Check to see if the resource has been created or not
f_checkCseTesterStatus();
//Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created");
setverdict(pass, testcasename() & "Resource not created");
} else {
setverdict(fail, testcasename() & "Resource created");
setverdict(fail, testcasename() & "Resource created");
}
//Postamble
......@@ -12738,11 +12790,13 @@ module OneM2M_Testcases {
}
}
//Check to see if the resource has been created or not
f_checkCseTesterStatus();
//Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created");
setverdict(pass, testcasename() & "Resource not created");
} else {
setverdict(fail, testcasename() & "Resource created");
setverdict(fail, testcasename() & "Resource created");
}
//Postamble
......@@ -12806,11 +12860,13 @@ module OneM2M_Testcases {
}
}
//Check to see if the resource has been created or not
f_checkCseTesterStatus();
//Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created");
setverdict(pass, testcasename() & "Resource not created");
} else {
setverdict(fail, testcasename() & "Resource created");
setverdict(fail, testcasename() & "Resource created");
}
//Postamble
......@@ -12874,11 +12930,13 @@ module OneM2M_Testcases {
}
}
//Check to see if the resource has been created or not
f_checkCseTesterStatus();
//Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created");
setverdict(pass, testcasename() & "Resource not created");
} else {
setverdict(fail, testcasename() & "Resource created");
setverdict(fail, testcasename() & "Resource created");
}
//Postamble
......@@ -14161,7 +14219,10 @@ module OneM2M_Testcases {
}
}
if(f_isResourceCreated(v_resourceIndex)){
f_checkCseTesterStatus();
//Check to see if the resource has been created or not
if(f_isResourceCreated(v_resourceIndex)) {
setverdict(pass, testcasename() & "Resource created");
} else {
setverdict(fail, testcasename() & "Resource not created");
......@@ -14234,7 +14295,10 @@ module OneM2M_Testcases {
}
}
if(f_isResourceCreated(v_resourceIndex)){
f_checkCseTesterStatus();
//Check to see if the resource has been created or not
if(f_isResourceCreated(v_resourceIndex)) {
setverdict(pass, testcasename() & "Resource created");
} else {
setverdict(fail, testcasename() & "Resource not created");
......@@ -14346,7 +14410,10 @@ module OneM2M_Testcases {
}
}
if(f_isResourceCreated(v_resourceIndex)){
f_checkCseTesterStatus();
//Check to see if the resource has been created or not
if(f_isResourceCreated(v_resourceIndex)) {
setverdict(pass, testcasename() & "Resource created");
} else {
setverdict(fail, testcasename() & "Resource not created");
......@@ -14430,11 +14497,6 @@ module OneM2M_Testcases {
}
}
if(f_isResourceNotCreated(v_acpIndex, f_getResourceName(v_createRequest.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created");
} else {
setverdict(fail, testcasename() & "Resource created");
}
//Postamble
f_cse_postamble_deleteResources();
......
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