Commit efd1ab62 authored by oneM2MTester Develop Team's avatar oneM2MTester Develop Team
Browse files

update existing LOC testcases

parent da7392e6
......@@ -569,9 +569,7 @@ module OneM2M_Templates {
};
//@Martin
template (value) RequestPrimitive m_createLocationPolicy(XSD.ID p_parentResourceAddress, in template (omit) AcpType p_accessControlPolicyIDs, in template (omit) XSD.Duration locationUpdatePeriod, in template (omit) NodeID locationTargetID, in template (omit) XSD.AnyURI locationServerAddress) modifies m_create := {
to_ := p_parentResourceAddress,
from_ := PX_AE_ID_STEM, //AE originator id e.g.
template (value) RequestPrimitive m_createLocationPolicy(in template (omit) AcpType p_accessControlPolicyIDs, in template (omit) XSD.Duration locationUpdatePeriod, in template (omit) NodeID locationTargetID, in template (omit) XSD.AnyURI locationServerAddress) modifies m_create := {
requestIdentifier := "m_createLocationPolicy", //the requestIdentifier is supposed to be set similar as "C190XX7T/001" by prepending the AE-ID-Stem and slash(‘/’) in front of it
resourceType := int10,
primitiveContent := {
......
......@@ -3839,8 +3839,7 @@ module OneM2M_Testcases {
testcase TC_CSE_LOC_BV_001() runs on CseTester system CseSystem {
var integer v_aeAuxIndex := -1;
var XSD.ID p_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
var integer v_aeAuxIndex := -1;
var RequestPrimitive v_request;
var MsgIn v_response;
......@@ -3851,7 +3850,7 @@ module OneM2M_Testcases {
v_aeAuxIndex := f_cse_preamble_registerAe();
//Set requestPrimitive
v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(p_aeResourceAddress, omit, omit, omit, omit), v_aeAuxIndex);
v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(omit, omit, omit, omit), v_aeAuxIndex);
//Test Body
mcaPort.send(m_request(v_request));
......@@ -3887,8 +3886,7 @@ module OneM2M_Testcases {
group g_CSE_LOC_BV_002{
testcase TC_CSE_LOC_BV_002() runs on CseTester system CseSystem {
var integer v_aeAuxIndex := -1;
var XSD.ID p_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
var integer v_aeAuxIndex := -1;
var XSD.Duration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD;
var XSD.Token locationTargetID := PX_LOCATION_TARGET_ID;
var XSD.AnyURI locationServerAddress := PX_LOCATION_SERVER_ADDRESS;
......@@ -3902,7 +3900,7 @@ module OneM2M_Testcases {
v_aeAuxIndex := f_cse_preamble_registerAe();
//Set requestPrimitive
v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(p_aeResourceAddress, omit, locationUpdatePeriod, locationTargetID, locationServerAddress), v_aeAuxIndex);
v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(omit, locationUpdatePeriod, locationTargetID, locationServerAddress), v_aeAuxIndex);
// Test Body
mcaPort.send(m_request(v_request));
......@@ -3934,10 +3932,9 @@ module OneM2M_Testcases {
group g_CSE_LOC_BO_001{
testcase TC_CSE_LOC_BO_001() runs on CseTester system CseSystem {//no AE_ID presented in the from_ is assigned privilege to do locationPolicy resource create operation!!
testcase TC_CSE_LOC_BO_001() runs on CseTester system CseSystem {//the originator has no privileges to create a locationPolicy resource!!
var integer v_aeAuxIndex := -1;
var XSD.ID p_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
var XSD.Duration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD;
var XSD.Token locationTargetID := PX_LOCATION_TARGET_ID;
var XSD.AnyURI locationServerAddress := PX_LOCATION_SERVER_ADDRESS;
......@@ -3949,12 +3946,9 @@ module OneM2M_Testcases {
//Preamble
v_aeAuxIndex := f_cse_preamble_registerAe(int62);//c_RUDNDi //No resource creation privilege
//Request target resource address
p_aeResourceAddress := f_addPrefix(f_getResourceAddress(v_aeAuxIndex));
//Set requestPrimitive
v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(p_aeResourceAddress, omit, locationUpdatePeriod, locationTargetID, locationServerAddress), v_aeAuxIndex);
v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(omit, locationUpdatePeriod, locationTargetID, locationServerAddress), v_aeAuxIndex);
// Test Body
mcaPort.send(m_request(v_request));
......@@ -3987,8 +3981,7 @@ module OneM2M_Testcases {
group g_CSE_LOC_BO_002{
testcase TC_CSE_LOC_BO_002() runs on CseTester system CseSystem {
var integer v_aeAuxIndex := -1;
var XSD.ID p_targetResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName & "/" & c_defaultResourceName;
var integer v_aeAuxIndex := -1;
var XSD.Duration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD;
var XSD.Token locationTargetID := PX_LOCATION_TARGET_ID;
var XSD.AnyURI locationServerAddress := PX_LOCATION_SERVER_ADDRESS;
......@@ -4002,7 +3995,7 @@ module OneM2M_Testcases {
v_aeAuxIndex := f_cse_preamble_registerAe();
//Set requestPrimitive
v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(p_targetResourceAddress, omit, locationUpdatePeriod, locationTargetID, locationServerAddress), v_aeAuxIndex);
v_request := f_getCreateRequestPrimitive(int10, m_createLocationPolicy(omit, locationUpdatePeriod, locationTargetID, locationServerAddress), v_aeAuxIndex);
// Test Body
mcaPort.send(m_request(v_request));
......@@ -4034,12 +4027,10 @@ module OneM2M_Testcases {
group g_CSE_LOC_BI_001{
testcase TC_CSE_LOC_BI_001() runs on CseTester system CseSystem {//reject a invalid update request with invalid attribtue locationUpdatePeriod
testcase TC_CSE_LOC_BI_001() runs on CseTester system CseSystem {//reject an invalid update request with invalid attribtue locationUpdatePeriod
var integer v_aeAuxIndex := -1;
var integer v_locPolicyResourceIndex := -1;
var XSD.ID p_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
var XSD.ID p_defaultResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName & "/" & c_defaultResourceName;
var integer v_locPolicyResourceIndex := -1;
var XSD.Duration locationUpdatePeriod_invalid := PX_LOCATION_UPDATE_PERIOD_INVALID;
var RequestPrimitive v_request;
var RequestPrimitive v_request_preamble;
......@@ -4051,11 +4042,11 @@ module OneM2M_Testcases {
//Preamble - register AE
v_aeAuxIndex := f_cse_preamble_registerAe();
//Preamble - create a valid locationPolicy resource for later update use
v_request_preamble := valueof(m_createLocationPolicy(p_aeResourceAddress, omit, PX_LOCATION_UPDATE_PERIOD, PX_LOCATION_TARGET_ID, PX_LOCATION_SERVER_ADDRESS));
v_request_preamble := valueof(m_createLocationPolicy(omit, PX_LOCATION_UPDATE_PERIOD, PX_LOCATION_TARGET_ID, PX_LOCATION_SERVER_ADDRESS));
v_locPolicyResourceIndex := f_cse_createResource(int10, v_request_preamble, v_aeAuxIndex);
//Set requestPrimitive
v_request := f_getUpdateRequestPrimitive(int10, v_locPolicyResourceIndex, m_updateLocationPolicy(p_defaultResourceAddress, omit, locationUpdatePeriod_invalid));
v_request := f_getUpdateRequestPrimitive(int10, v_locPolicyResourceIndex, m_updateLocationPolicy(f_getResourceAddress(v_locPolicyResourceIndex), omit, locationUpdatePeriod_invalid));
// Test Body
mcaPort.send(m_request(v_request));
......@@ -4084,6 +4075,8 @@ module OneM2M_Testcases {
}//end group g_CSE_LOC_BI_001
}//end group Location
......
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