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

Merge branch 'STF531-CHECK-TPREQ-TTCN' into 'master'

Stf531 check tpreq ttcn



See merge request !20
parents e4718e92 de41d290
No related branches found
No related tags found
1 merge request!25Ae fixes
......@@ -620,6 +620,72 @@ module OneM2M_Functions {
}// end f_cse_deleteResource
/**
* @desc Check that a resource is present in the IUT (resourceId is known)
* @param p_resourceIndex Resource index
* @return boolean
*/
function f_isResourcePresent (integer p_resourceIndex) runs on CseTester return boolean {
var ResponseStatusCode v_responseStatusCode;
//Check to see if the resource is present or not
mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(p_resourceIndex), f_getOriginator(p_resourceIndex))));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": Resource present: " & f_getResourceAddress(p_resourceIndex));
return true;
}
[] mcaPort.receive(mw_response(mw_responsePrimitive(?, -))) {
tc_ac.stop;
setverdict(inconc, testcasename() & ": Wrong response status code in the response");
return false;
}
[] tc_ac.timeout {
setverdict(inconc, testcasename() & ": No answer while retrieving resource");
return false;
}
}
}
/**
* @desc Check that a resource is not present in the IUT (resourceId is NOT known)
* @param p_parentIndex Index of the parent resource
* @param p_resourceName Resource name (Hierarchical method is used)
* @return boolean
*/
function f_isResourceNotPresent (integer p_parentIndex, XSD.String p_resourceName) runs on CseTester return boolean {
var ResponseStatusCode v_responseStatusCode;
log(testcasename() & "Hierarchical method is required to check the non presence of the resource");
vc_addressingMethod := e_hierarchical;
//Check to see if the resource has NOT been created
mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(p_parentIndex) & "/" & p_resourceName, f_getOriginator(p_parentIndex))));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": Resource not present");
vc_addressingMethod := PX_ADDRESSING_METHOD;
return true;
}
[] mcaPort.receive(mw_response(mw_responsePrimitive(?))) {
tc_ac.stop;
setverdict(inconc, testcasename() & ": Wrong response status code in the response");
vc_addressingMethod := PX_ADDRESSING_METHOD;
return false;
}
[] tc_ac.timeout {
setverdict(inconc, testcasename() & ": No answer while retrieving resource");
vc_addressingMethod := PX_ADDRESSING_METHOD;
return false;
}
}
}
/**
* @desc Update of the auxiliar ACP resource
* @param p_allowedOperations New allowed operations
......@@ -974,14 +1040,7 @@ module OneM2M_Functions {
unmap(self:mcaPort, system:mcaPort);
unmap(self:acPort, system:acPort);
} //end f_cse_notifyProcedure_subscriptionDeletion
function f_isResourceNotDeleted(in integer p_resourceIndex) runs on Tester return boolean {
//TODO Call f_isResourcePresent
return false;
}
} //end f_cse_notifyProcedure_subscriptionDeletion
/**
* @desc It determines whether the addressing method of the given address is non-hierarchical. Not valid for CSE-Base as target
......
......@@ -3119,7 +3119,7 @@ module OneM2M_Templates {
* @param p_statusCode Status code
* @param p_requestId Request ID of the corresponding request
*/
template (value) ResponsePrimitive m_responsePrimitive(in ResponseStatusCode p_statusCode, in RequestID p_requestId, in template (omit) PrimitiveContent p_content := omit) := {
template (value) ResponsePrimitive m_responsePrimitive(in template ResponseStatusCode p_statusCode, in RequestID p_requestId, in template (omit) PrimitiveContent p_content := omit) := {
responseStatusCode := p_statusCode,
requestIdentifier := p_requestId,
primitiveContent := p_content,
......@@ -3139,11 +3139,11 @@ module OneM2M_Templates {
* @param p_statusCode Status code
* @param p_requestId Request ID of the corresponding request
*/
template (value) ResponsePrimitive m_responsePrimitive_content(in ResponseStatusCode p_statusCode, in RequestID p_requestId, in template (value) PrimitiveContent p_content) modifies m_responsePrimitive := {
template (value) ResponsePrimitive m_responsePrimitive_content(in template ResponseStatusCode p_statusCode, in RequestID p_requestId, in template (value) PrimitiveContent p_content) modifies m_responsePrimitive := {
primitiveContent := p_content
}
template ResponsePrimitive mw_responsePrimitive(ResponseStatusCode p_statusCode, in template PrimitiveContent p_content := *) := {
template ResponsePrimitive mw_responsePrimitive(in template ResponseStatusCode p_statusCode, in template PrimitiveContent p_content := *) := {
responseStatusCode := p_statusCode,
requestIdentifier := ?,
primitiveContent := p_content,
......
......@@ -1130,6 +1130,7 @@ module OneM2M_Testcases {
var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
var PrimitiveContent v_primitiveContentRetrieveResource;
// Test component configuration
f_cf02Up();
......@@ -1159,7 +1160,9 @@ module OneM2M_Testcases {
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while creating AE");
}
}
}
//v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex);
// Postamble
f_cse_postamble_deleteResources();
......@@ -1778,7 +1781,7 @@ module OneM2M_Testcases {
}//end Registration
group Data_Management_and_Repository {
group Create {
group g_CSE_DMR_CRE_001 {
......@@ -1799,7 +1802,7 @@ module OneM2M_Testcases {
if(getverdict == pass){
if(not ispresent(v_responsePrimitive.primitiveContent.container.resourceName)){
setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided");
}
}
}
}
......@@ -1813,8 +1816,8 @@ module OneM2M_Testcases {
v_createRequest.primitiveContent.group_.resourceName := omit;
v_responsePrimitive := f_CSE_DMR_CRE_001(int3, v_createRequest, m_createAeAux(omit,omit),v_notifyHandler);//Container
if(getverdict == pass) {
if(not ispresent(v_responsePrimitive.primitiveContent.group_.resourceName)){
if(getverdict == pass){
if(not ispresent(v_responsePrimitive.primitiveContent.group_.resourceName)){
setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided");
}
}
......@@ -2227,7 +2230,7 @@ module OneM2M_Testcases {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfully");
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_parentIndex);
}
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
......@@ -2242,6 +2245,13 @@ module OneM2M_Testcases {
}
f_checkCseTesterStatus();
//Check to see if the resource is present or not
if (f_isResourcePresent(v_resourceIndex)){
setverdict(pass, __SCOPE__ & ":INFO: Resource created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource not created");
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -2374,6 +2384,7 @@ module OneM2M_Testcases {
var integer v_aeIndex := -1;
var CseTester v_notifyHandler;
var integer v_ae2Index := -1;
var integer v_resourceIndex := -1;
// Test control
......@@ -2396,6 +2407,7 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfully");
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_aeIndex);
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
......@@ -2409,7 +2421,15 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType)));
}
}
f_checkCseTesterStatus();
//Check to see if the resource is present or not
if(f_isResourcePresent(v_resourceIndex)){
setverdict(pass, __SCOPE__ & ":INFO: Resource created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource not created");
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -2616,7 +2636,16 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
if(f_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -2707,7 +2736,17 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType)));
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
if(f_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -2773,6 +2812,7 @@ module OneM2M_Testcases {
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
// Test control
......@@ -2793,6 +2833,7 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Accepted creation rejected for resource type " & int2str(enum2int(p_resourceType)));
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_aeIndex);
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
......@@ -2806,6 +2847,15 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType)));
}
}
f_checkCseTesterStatus();
//Check to see if the resource is present or not
if(f_isResourcePresent(v_resourceIndex)){
setverdict(pass, __SCOPE__ & ":INFO: Resource created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource not created");
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -2864,12 +2914,22 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Accepted creation of contentInstance exceding maximum number of instances");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while creating resource type 4");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
if(f_isResourceNotPresent(v_containerIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -2893,7 +2953,7 @@ module OneM2M_Testcases {
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_containerIndex := -1;
const integer c_maxByteSize := 0;
const integer c_maxByteSize := 0;
// Test control
// Test component configuration
......@@ -2926,11 +2986,21 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Accepted creation of contentInstance exceding maximum byte size");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while creating resource type 4");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is present or not
if(f_isResourceNotPresent(v_containerIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, __SCOPE__ & ":INFO: Resource created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource not created");
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -2992,7 +3062,7 @@ module OneM2M_Testcases {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements");
}
......@@ -3052,6 +3122,7 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Not allowed to create a contentInstance resource named 'la'");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
......@@ -3060,11 +3131,21 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Accepted creation of contentInstance named 'la'");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while creating resource type 4");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
if(f_isResourceNotPresent(v_containerIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -3089,6 +3170,7 @@ module OneM2M_Testcases {
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_containerIndex := -1;
var boolean v_resourceCreated := false;
// Test control
......@@ -3113,6 +3195,7 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Not allowed to create a contentInstance resource named 'ol'");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
......@@ -3121,11 +3204,21 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Accepted creation of contentInstance named 'ol'");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while creating resource type 4");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
if(f_isResourceNotPresent(v_containerIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -3818,6 +3911,7 @@ module OneM2M_Testcases {
var CseTester v_notifyHandler;
var integer v_ae2Index := -1;
const XSD.NCName c_accessControlPolicyIDs := "accessControlPolicyIDs";
var integer v_resourceIndex := -1;
// Test control
if(match(c_accessControlPolicyIDs,p_optionalAttribute.name)) {
......@@ -3856,6 +3950,7 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Accepted creation for resource type " & int2str(enum2int(p_resourceType)) & " containing attribute " & p_optionalAttribute.name);
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_parentIndex);
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response {
tc_ac.stop;
......@@ -3873,6 +3968,15 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType)));
}
}
f_checkCseTesterStatus();
//Check to see if the resource is present or not
if(f_isResourcePresent(v_resourceIndex)) {
setverdict(pass, __SCOPE__ & ":INFO: Resource created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource not created");
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -4228,7 +4332,7 @@ module OneM2M_Testcases {
[] mccPort.receive(mw_request(p_requestAnnc)) -> value v_anncRequest {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Correct CREATE request for the resource announced variant");
}
}
[] mccPort.receive(mw_request(?)) -> value v_anncRequest {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong CREATE request received");
......@@ -4498,7 +4602,7 @@ module OneM2M_Testcases {
// Local variables
f_CSE_DMR_RET_003(int23, m_createSubscriptionBase);//Subscription
}
}
function f_CSE_DMR_RET_003(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on CseTester {
......@@ -4757,7 +4861,7 @@ module OneM2M_Testcases {
v_contentResponse.subscription.parentID := ?;
f_CSE_DMR_RET_005(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
}
}
function f_CSE_DMR_RET_005(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester {
......@@ -4890,7 +4994,7 @@ module OneM2M_Testcases {
v_contentResponse.subscription.creationTime := ?;
f_CSE_DMR_RET_006(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
}
}
function f_CSE_DMR_RET_006(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester {
......@@ -4994,7 +5098,7 @@ module OneM2M_Testcases {
// Local variables
f_CSE_DMR_RET_007(int23, m_createSubscriptionBase);//Subscription
}
}
function f_CSE_DMR_RET_007(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on CseTester {
......@@ -5093,7 +5197,7 @@ module OneM2M_Testcases {
// Local variables
f_CSE_DMR_RET_008(int23, m_createSubscriptionBase);//Subscription
}
}
function f_CSE_DMR_RET_008(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on CseTester {
......@@ -5879,7 +5983,7 @@ module OneM2M_Testcases {
v_contentResponse.subscription.parentID := ?;
f_CSE_DMR_RET_016(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
}
}
function f_CSE_DMR_RET_016(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester {
......@@ -6028,7 +6132,7 @@ module OneM2M_Testcases {
v_contentResponse.subscription.creationTime := ?;
f_CSE_DMR_RET_017(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
}
}
function f_CSE_DMR_RET_017(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester {
......@@ -6143,7 +6247,7 @@ module OneM2M_Testcases {
// Local variables
f_CSE_DMR_RET_018(int23, m_createSubscriptionBase);//Subscription
}
}
function f_CSE_DMR_RET_018(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on CseTester {
......@@ -6254,7 +6358,7 @@ module OneM2M_Testcases {
// Local variables
f_CSE_DMR_RET_019(int23, m_createSubscriptionBase);//Subscription
}
}
function f_CSE_DMR_RET_019(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on CseTester {
......@@ -6318,7 +6422,7 @@ module OneM2M_Testcases {
}//end f_CSE_DMR_RET_019
} // end f_CSE_DMR_RET_019
group g_CSE_DMR_RET_020 {
/**
......@@ -7069,16 +7173,15 @@ module OneM2M_Testcases {
var Labels v_labels_1 := {"VALUE_1"};
var Labels v_labels_2:= {"VALUE_2"};
var ResponsePrimitive v_responsePrimitive;
var template RequestPrimitive v_createRequest := m_createContainerBase;
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_createRequest.primitiveContent.container.labels := v_labels_1;
v_updateRequest.primitiveContent.container.labels := v_labels_2;
v_responsePrimitive := f_CSE_DMR_UPD_001(int3, v_createRequest, v_updateRequest);//Container
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
......@@ -7088,6 +7191,12 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.container)) {
if(v_primitiveContentRetrieveResource.container.labels != v_labels_2){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
......@@ -7098,6 +7207,7 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createGroupBase;
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_createRequest.primitiveContent.group_.labels := v_labels_1;
v_updateRequest.primitiveContent.group_.labels := v_labels_2;
......@@ -7113,6 +7223,12 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.group_)) {
if(v_primitiveContentRetrieveResource.group_.labels != v_labels_2){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
......@@ -7123,6 +7239,7 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createAcpBase;
var template RequestPrimitive v_updateRequest := m_updateAcpBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_createRequest.primitiveContent.accessControlPolicy.labels := v_labels_1;
v_updateRequest.primitiveContent.accessControlPolicy.labels := v_labels_2;
......@@ -7138,6 +7255,12 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.accessControlPolicy)) {
if(v_primitiveContentRetrieveResource.accessControlPolicy.labels != v_labels_2){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
......@@ -7149,6 +7272,7 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createScheduleBase;
var template RequestPrimitive v_updateRequest := m_updateScheduleBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_createRequest.primitiveContent.schedule.labels := v_labels_1;
v_updateRequest.primitiveContent.schedule.labels := v_labels_2;
......@@ -7164,6 +7288,12 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.schedule)) {
if(v_primitiveContentRetrieveResource.schedule.labels != v_labels_2){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
......@@ -7175,6 +7305,7 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createPollingChannelBase;
var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_createRequest.primitiveContent.pollingChannel.labels := v_labels_1;
v_updateRequest.primitiveContent.pollingChannel.labels := v_labels_2;
......@@ -7190,6 +7321,12 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.pollingChannel)) {
if(v_primitiveContentRetrieveResource.pollingChannel.labels != v_labels_2){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
......@@ -7200,11 +7337,12 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_createRequest.primitiveContent.subscription.labels := v_labels_1;
v_updateRequest.primitiveContent.subscription.labels := v_labels_2;
v_responsePrimitive := f_CSE_DMR_UPD_001(int23, v_createRequest, v_updateRequest);//Subscription
v_responsePrimitive := f_CSE_DMR_UPD_001(int23, v_createRequest, v_updateRequest, v_primitiveContentRetrieveResource);//Subscription
if(getverdict == pass){
//Check attribute 1
......@@ -7215,11 +7353,17 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.subscription)) {
if(v_primitiveContentRetrieveResource.subscription.labels != v_labels_2){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
function f_CSE_DMR_UPD_001(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on CseTester return ResponsePrimitive{
function f_CSE_DMR_UPD_001(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, out PrimitiveContent p_primitiveContentRetrievedResource) runs on CseTester return ResponsePrimitive{
// Local variables
var MsgIn v_response;
......@@ -7265,7 +7409,12 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType)));
}
}
f_checkCseTesterStatus();
//Used to check that the resource has been updated
p_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex);
// Postamble
f_cse_postamble_deleteResources();
......@@ -7289,6 +7438,7 @@ module OneM2M_Testcases {
var Labels v_labels_1 := {"VALUE_1"};
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.container.labels := v_labels_1;
......@@ -7303,6 +7453,13 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.container)) {
if(v_primitiveContentRetrieveResource.container.labels != v_labels_1){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
......@@ -7311,6 +7468,7 @@ module OneM2M_Testcases {
var Labels v_labels_1 := {"VALUE_1"};
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.group_.labels := v_labels_1;
......@@ -7325,6 +7483,13 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.group_)) {
if(v_primitiveContentRetrieveResource.group_.labels != v_labels_1){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
......@@ -7333,6 +7498,7 @@ module OneM2M_Testcases {
var Labels v_labels_1 := {"VALUE_1"};
var template RequestPrimitive v_updateRequest := m_updateAcpBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.accessControlPolicy.labels := v_labels_1;
......@@ -7347,6 +7513,13 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.accessControlPolicy)) {
if(v_primitiveContentRetrieveResource.accessControlPolicy.labels != v_labels_1){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
......@@ -7355,6 +7528,7 @@ module OneM2M_Testcases {
var Labels v_labels_1 := {"VALUE_1"};
var template RequestPrimitive v_updateRequest := m_updateScheduleBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.schedule.labels := v_labels_1;
......@@ -7369,6 +7543,13 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.schedule)) {
if(v_primitiveContentRetrieveResource.schedule.labels != v_labels_1){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
......@@ -7377,6 +7558,7 @@ module OneM2M_Testcases {
var Labels v_labels_1 := {"VALUE_1"};
var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.pollingChannel.labels := v_labels_1;
......@@ -7391,6 +7573,13 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.pollingChannel)) {
if(v_primitiveContentRetrieveResource.pollingChannel.labels != v_labels_1){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
......@@ -7399,6 +7588,7 @@ module OneM2M_Testcases {
var Labels v_labels_1 := {"VALUE_1"};
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.subscription.labels := v_labels_1;
......@@ -7413,10 +7603,17 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.subscription)) {
if(v_primitiveContentRetrieveResource.subscription.labels != v_labels_1){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
function f_CSE_DMR_UPD_002(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on CseTester return ResponsePrimitive {
function f_CSE_DMR_UPD_002(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, out PrimitiveContent p_primitiveContentRetrievedResource) runs on CseTester return ResponsePrimitive {
// Local variables
var MsgIn v_response;
......@@ -7462,7 +7659,10 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType)));
}
}
//Used to check that the resource has been updated
p_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex);
// Postamble
f_cse_postamble_deleteResources();
......@@ -7489,6 +7689,7 @@ module OneM2M_Testcases {
var ResponsePrimitive v_responsePrimitive;
var template RequestPrimitive v_createRequest := m_createContainerBase;
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_createRequest.primitiveContent.container.labels := v_labels_1;
v_updateRequest.primitiveContent.container.labels := v_labels_2;
......@@ -7508,6 +7709,15 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.container)) {
if(ispresent(v_primitiveContentRetrieveResource.container.labels)) {
if(not(match(v_primitiveContentRetrieveResource.container.labels,{""}))){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
}
}
}
}
}
......@@ -7519,6 +7729,7 @@ module OneM2M_Testcases {
var ResponsePrimitive v_responsePrimitive;
var template RequestPrimitive v_createRequest := m_createGroupBase;
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_createRequest.primitiveContent.group_.labels := v_labels_1;
v_updateRequest.primitiveContent.group_.labels := v_labels_2;
......@@ -7536,6 +7747,15 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.group_)) {
if(ispresent(v_primitiveContentRetrieveResource.group_.labels)) {
if(not(match(v_primitiveContentRetrieveResource.group_.labels,{""}))){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
}
}
}
}
}
......@@ -7547,6 +7767,7 @@ module OneM2M_Testcases {
var ResponsePrimitive v_responsePrimitive;
var template RequestPrimitive v_createRequest := m_createAcpBase;
var template RequestPrimitive v_updateRequest := m_updateAcpBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_createRequest.primitiveContent.accessControlPolicy.labels := v_labels_1;
v_updateRequest.primitiveContent.accessControlPolicy.labels := v_labels_2;
......@@ -7564,6 +7785,15 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.accessControlPolicy)) {
if(ispresent(v_primitiveContentRetrieveResource.accessControlPolicy.labels)) {
if(not(match(v_primitiveContentRetrieveResource.accessControlPolicy.labels,{""}))){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
}
}
}
}
}
......@@ -7575,6 +7805,7 @@ module OneM2M_Testcases {
var ResponsePrimitive v_responsePrimitive;
var template RequestPrimitive v_createRequest := m_createScheduleBase;
var template RequestPrimitive v_updateRequest := m_updateScheduleBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_createRequest.primitiveContent.schedule.labels := v_labels_1;
v_updateRequest.primitiveContent.schedule.labels := v_labels_2;
......@@ -7592,6 +7823,15 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.schedule)) {
if(ispresent(v_primitiveContentRetrieveResource.schedule.labels)) {
if(not(match(v_primitiveContentRetrieveResource.schedule.labels,{""}))){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
}
}
}
}
}
......@@ -7603,6 +7843,7 @@ module OneM2M_Testcases {
var ResponsePrimitive v_responsePrimitive;
var template RequestPrimitive v_createRequest := m_createPollingChannelBase;
var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_createRequest.primitiveContent.pollingChannel.labels := v_labels_1;
v_updateRequest.primitiveContent.pollingChannel.labels := v_labels_2;
......@@ -7620,6 +7861,15 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.pollingChannel)) {
if(ispresent(v_primitiveContentRetrieveResource.pollingChannel.labels)) {
if(not(match(v_primitiveContentRetrieveResource.pollingChannel.labels,{""}))){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
}
}
}
}
}
......@@ -7631,6 +7881,7 @@ module OneM2M_Testcases {
var ResponsePrimitive v_responsePrimitive;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_createRequest.primitiveContent.subscription.labels := v_labels_1;
v_updateRequest.primitiveContent.subscription.labels := v_labels_2;
......@@ -7648,10 +7899,19 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.subscription)) {
if(ispresent(v_primitiveContentRetrieveResource.subscription.labels)) {
if(not(match(v_primitiveContentRetrieveResource.subscription.labels,{""}))){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
}
}
}
}
}
function f_CSE_DMR_UPD_003(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, template (omit) AttributeAux_list p_nullFields := omit) runs on CseTester return ResponsePrimitive {
function f_CSE_DMR_UPD_003(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, template (omit) AttributeAux_list p_nullFields := omit, out PrimitiveContent p_primitiveContentRetrievedResource) runs on CseTester return ResponsePrimitive {
// Local variables
var MsgIn v_response;
......@@ -7699,7 +7959,9 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType)));
}
}
p_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex);
// Postamble
f_cse_postamble_deleteResources();
......@@ -7726,6 +7988,7 @@ module OneM2M_Testcases {
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
var ResponsePrimitive v_responsePrimitive;
var AttributeAux_list v_nullFields;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_createRequest.primitiveContent.container.labels := v_labels_1;//Attribute 3
v_updateRequest.primitiveContent.container.expirationTime := "20301231T012345";//Attribute 1
......@@ -7753,6 +8016,22 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.container)) {
//Check attribute 1
if(v_primitiveContentRetrieveResource.container.expirationTime != valueof(v_updateRequest.primitiveContent.container.expirationTime)){
setverdict(fail, __SCOPE__ & ": Error: Expiration Time attribute not updated correctly")
}
//Check attribute 2
if(v_primitiveContentRetrieveResource.container.maxNrOfInstances != valueof(v_updateRequest.primitiveContent.container.maxNrOfInstances)){
setverdict(fail, __SCOPE__ & ": Error: MaxNrOfInstances attribute not updated correctly")
}
//Check attribute 3
if(ispresent(v_primitiveContentRetrieveResource.container.labels)){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
}
}
}
}
......@@ -7766,6 +8045,7 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createGroupBase;
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_createRequest.primitiveContent.group_.labels := v_labels_1;//Attribute 3
v_updateRequest.primitiveContent.group_.expirationTime := "20301231T012345";//Attribute 1
......@@ -7793,6 +8073,22 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.group_)) {
//Check attribute 1
if(v_primitiveContentRetrieveResource.group_.groupName != valueof(v_updateRequest.primitiveContent.group_.groupName)){
setverdict(fail, __SCOPE__ & ": Error: groupName attribute not updated correctly")
}
//Check attribute 2
if(v_primitiveContentRetrieveResource.group_.expirationTime != valueof(v_updateRequest.primitiveContent.group_.expirationTime)){
setverdict(fail, __SCOPE__ & ": Error: expirationTime attribute not updated correctly")
}
//Check attribute 3
if(ispresent(v_primitiveContentRetrieveResource.group_.labels)){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
}
}
}
}
......@@ -7815,6 +8111,7 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createAcpBase;// privileges set by default to 63 for *
var template RequestPrimitive v_updateRequest := m_updateAcpBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_createRequest.primitiveContent.accessControlPolicy.labels := v_labels_1;//Attribute 3
v_updateRequest.primitiveContent.accessControlPolicy.privileges := v_privileges_2; //Attribute 1
......@@ -7842,6 +8139,22 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.accessControlPolicy)) {
//Check attribute 1
if(not match (v_primitiveContentRetrieveResource.accessControlPolicy.privileges.accessControlRule_list[0].accessControlOperations, v_privileges_2.accessControlRule_list[0].accessControlOperations)){
setverdict(fail, __SCOPE__ & ": Error: Privileges attribute not updated correctly")
}
//Check attribute 2
if(not match (v_primitiveContentRetrieveResource.accessControlPolicy.announceTo, valueof(v_updateRequest.primitiveContent.accessControlPolicy.announceTo))){
setverdict(fail, __SCOPE__ & ": Error: Announce_to attribute not updated correctly")
}
//Check attribute 3
if(ispresent(v_primitiveContentRetrieveResource.accessControlPolicy.labels)){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
}
}
}
}
......@@ -7853,6 +8166,7 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createScheduleBase;
var template RequestPrimitive v_updateRequest := m_updateScheduleBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_createRequest.primitiveContent.schedule.scheduleElement := {{"0,0,0 1 2,1,1,*"}};//Attribute 1
v_updateRequest.primitiveContent.schedule.scheduleElement := {{"1,1,1 1 2,1,1,*"}}; //Attribute 1
......@@ -7868,11 +8182,11 @@ module OneM2M_Testcases {
if(ischosen(v_responsePrimitive.primitiveContent.schedule)) {
//Check attribute 1
if(v_responsePrimitive.primitiveContent.schedule.scheduleElement != valueof(v_updateRequest.primitiveContent.schedule.scheduleElement)){
setverdict(fail, __SCOPE__ & ": Error: Expiration Time attribute not updated correctly")
setverdict(fail, __SCOPE__ & ": Error: Schedule Element attribute not updated correctly")
}
//Check attribute 2
if(v_responsePrimitive.primitiveContent.schedule.announceTo != valueof(v_updateRequest.primitiveContent.schedule.announceTo)){
setverdict(fail, __SCOPE__ & ": Error: MaxNrOfInstances attribute not updated correctly")
setverdict(fail, __SCOPE__ & ": Error: Announce_To attribute not updated correctly")
}
//Check attribute 3
if(ispresent(v_responsePrimitive.primitiveContent.schedule.labels)){
......@@ -7880,6 +8194,22 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.schedule)) {
//Check attribute 1
if(v_primitiveContentRetrieveResource.schedule.scheduleElement != valueof(v_updateRequest.primitiveContent.schedule.scheduleElement)){
setverdict(fail, __SCOPE__ & ": Error: Schedule Element attribute not updated correctly")
}
//Check attribute 2
if(v_primitiveContentRetrieveResource.schedule.announceTo != valueof(v_updateRequest.primitiveContent.schedule.announceTo)){
setverdict(fail, __SCOPE__ & ": Error: Announce_To attribute not updated correctly")
}
//Check attribute 3
if(ispresent(v_primitiveContentRetrieveResource.schedule.labels)){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
}
}
}
}
......@@ -7892,6 +8222,7 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createPollingChannelBase;
var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_createRequest.primitiveContent.pollingChannel.labels := v_labels_1;//Attribute 3
//No Attribute 1
......@@ -7917,6 +8248,13 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.pollingChannel)) {
if(ispresent (v_primitiveContentRetrieveResource.pollingChannel.labels)){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
}
}
}
}
......@@ -7927,6 +8265,7 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_createRequest.primitiveContent.subscription.expirationCounter := 10;//Attribute 3
v_updateRequest.primitiveContent.subscription.expirationTime := "20301231T012345";//Attribute 1
......@@ -7954,10 +8293,26 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.subscription)) {
//Check attribute 1
if(not match (v_primitiveContentRetrieveResource.subscription.labels, valueof(v_updateRequest.primitiveContent.subscription.labels))){
setverdict(fail, __SCOPE__ & ": Error: Label attribute not updated correctly")
}
//Check attribute 2
if(not match (v_primitiveContentRetrieveResource.subscription.expirationTime, valueof(v_updateRequest.primitiveContent.subscription.expirationTime))){
setverdict(fail, __SCOPE__ & ": Error: expirationTime attribute not updated correctly")
}
//Check attribute 3
if(ispresent(v_primitiveContentRetrieveResource.subscription.expirationCounter)){
setverdict(fail, __SCOPE__ & ": Error: expirationCounter attribute not deleted correctly")
}
}
}
}
function f_CSE_DMR_UPD_004(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, template (omit) AttributeAux_list p_nullFields := omit) runs on CseTester return ResponsePrimitive {
function f_CSE_DMR_UPD_004(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, template (omit) AttributeAux_list p_nullFields := omit, out PrimitiveContent p_primitiveContentRetrievedResource) runs on CseTester return ResponsePrimitive {
// Local variables
var MsgIn v_response;
......@@ -8003,7 +8358,9 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType)));
}
}
p_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex);
// Postamble
f_cse_postamble_deleteResources();
......@@ -8156,20 +8513,38 @@ module OneM2M_Testcases {
// Local variables
var Labels v_labels_1 := {"VALUE_1"};
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.container.labels := v_labels_1;
f_CSE_DMR_UPD_006(int3, m_createContainerBase, v_updateRequest);//Container
if(getverdict == pass){
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.container)) {
if(v_primitiveContentRetrieveResource.container.labels == v_labels_1){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute updated")
}
}
}
}
testcase TC_CSE_DMR_UPD_006_GRP_LBL() runs on CseTester system CseSystem {
// Local variables
var Labels v_labels_1 := {"VALUE_1"};
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.group_.labels := v_labels_1;
f_CSE_DMR_UPD_006(int9, m_createGroupBase, v_updateRequest);//Group
if(getverdict == pass){
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.group_)) {
if(v_primitiveContentRetrieveResource.group_.labels == v_labels_1){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute updated")
}
}
}
}
testcase TC_CSE_DMR_UPD_006_ACP_LBL() runs on CseTester system CseSystem {
......@@ -8177,45 +8552,81 @@ module OneM2M_Testcases {
var Labels v_labels_1 := {"VALUE_1"};
var template RequestPrimitive v_updateRequest := m_updateAcpBase;
var template RequestPrimitive v_requestPrimitive := m_createAcpBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_requestPrimitive.primitiveContent.accessControlPolicy.selfPrivileges.accessControlRule_list[0].accessControlOperations := int59;
v_updateRequest.primitiveContent.accessControlPolicy.labels := v_labels_1;
f_CSE_DMR_UPD_006(int1, v_requestPrimitive, v_updateRequest);//AccessControlPolicy
if(getverdict == pass){
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.accessControlPolicy)) {
if(v_primitiveContentRetrieveResource.accessControlPolicy.labels == v_labels_1){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute updated")
}
}
}
}
testcase TC_CSE_DMR_UPD_006_SCH_LBL() runs on CseTester system CseSystem {
// Local variables
var Labels v_labels_1 := {"VALUE_1"};
var template RequestPrimitive v_updateRequest := m_updateScheduleBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.schedule.labels := v_labels_1;
f_CSE_DMR_UPD_006(int18, m_createScheduleBase, v_updateRequest);//Schedule
if(getverdict == pass){
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.schedule)) {
if(v_primitiveContentRetrieveResource.schedule.labels == v_labels_1){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute updated")
}
}
}
}
testcase TC_CSE_DMR_UPD_006_PCH_LBL() runs on CseTester system CseSystem {
// Local variable
var Labels v_labels_1 := {"VALUE_1"};
var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.pollingChannel.labels := v_labels_1;
f_CSE_DMR_UPD_006(int15, m_createPollingChannelBase, v_updateRequest);//PollingChannel
if(getverdict == pass){
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.pollingChannel)) {
if(v_primitiveContentRetrieveResource.pollingChannel.labels == v_labels_1){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute updated")
}
}
}
}
testcase TC_CSE_DMR_UPD_006_SUB_LBL() runs on CseTester system CseSystem {
// Local variables
var Labels v_labels_1 := {"VALUE_1"};
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.subscription.labels := v_labels_1;
f_CSE_DMR_UPD_006(int23, m_createSubscriptionBase, v_updateRequest);//Subscription
if(getverdict == pass){
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.subscription)) {
if(v_primitiveContentRetrieveResource.subscription.labels == v_labels_1){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute updated")
}
}
}
}
function f_CSE_DMR_UPD_006(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on CseTester {
function f_CSE_DMR_UPD_006(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, out PrimitiveContent p_primitiveContentRetrievedResource) runs on CseTester {
// Local variables
var MsgIn v_response;
......@@ -8267,7 +8678,9 @@ module OneM2M_Testcases {
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType)));
}
}
}
p_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex);
// Postamble
f_cse_postamble_deleteResources();
......@@ -8290,69 +8703,123 @@ module OneM2M_Testcases {
// Local variables
var Timestamp v_creationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent := {container_update_invalid := m_contentUpdateContainer_invalid};
v_updateRequest.primitiveContent.container_update_invalid.creationTime := v_creationTime;
f_CSE_DMR_UPD_007(int3, m_createContainerBase, v_updateRequest);//Container
if(getverdict == pass){
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.container_update_invalid)) {
if(v_primitiveContentRetrieveResource.container_update_invalid.creationTime == v_creationTime){
setverdict(fail, __SCOPE__ & ": Error: Creation Time attribute updated")
}
}
}
}
testcase TC_CSE_DMR_UPD_007_GRP_CT() runs on CseTester system CseSystem {
// Local variables
var Timestamp v_creationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent := {group_update_invalid := m_contentUpdateGroup_invalid};
v_updateRequest.primitiveContent.group_update_invalid.creationTime := v_creationTime;
f_CSE_DMR_UPD_007(int9, m_createGroupBase, v_updateRequest);//Group
if(getverdict == pass){
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.group_update_invalid)) {
if(v_primitiveContentRetrieveResource.group_update_invalid.creationTime == v_creationTime){
setverdict(fail, __SCOPE__ & ": Error: Creation Time attribute updated")
}
}
}
}
testcase TC_CSE_DMR_UPD_007_ACP_CT() runs on CseTester system CseSystem {
// Local variables
var Timestamp v_creationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateAcpBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent := {aCP_update_invalid := m_contentUpdateAcp_invalid};
v_updateRequest.primitiveContent.aCP_update_invalid.creationTime := v_creationTime;
f_CSE_DMR_UPD_007(int1, m_createAcpBase, v_updateRequest);//AccessControlPolicy
if(getverdict == pass){
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.aCP_update_invalid)) {
if(v_primitiveContentRetrieveResource.aCP_update_invalid.creationTime == v_creationTime){
setverdict(fail, __SCOPE__ & ": Error: Creation Time attribute updated")
}
}
}
}
testcase TC_CSE_DMR_UPD_007_SCH_CT() runs on CseTester system CseSystem {
// Local variables
var Timestamp v_creationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateScheduleBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent := {schedule_update_invalid := m_contentUpdateSchedule_invalid};
v_updateRequest.primitiveContent.schedule_update_invalid.creationTime := v_creationTime;
f_CSE_DMR_UPD_007(int18, m_createScheduleBase, v_updateRequest);//Schedule
if(getverdict == pass){
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.schedule_update_invalid)) {
if(v_primitiveContentRetrieveResource.schedule_update_invalid.creationTime == v_creationTime){
setverdict(fail, __SCOPE__ & ": Error: Creation Time attribute updated")
}
}
}
}
testcase TC_CSE_DMR_UPD_007_PCH_CT() runs on CseTester system CseSystem {
// Local variables
var Timestamp v_creationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent := {pollingChannel_update_invalid := m_contentUpdatePollingChannel_invalid};
v_updateRequest.primitiveContent.pollingChannel_update_invalid.creationTime := v_creationTime;
f_CSE_DMR_UPD_007(int15, m_createPollingChannelBase, v_updateRequest);//PollingChannel
if(getverdict == pass){
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.pollingChannel_update_invalid)) {
if(v_primitiveContentRetrieveResource.pollingChannel_update_invalid.creationTime == v_creationTime){
setverdict(fail, __SCOPE__ & ": Error: Creation Time attribute updated")
}
}
}
}
testcase TC_CSE_DMR_UPD_007_SUB_CT() runs on CseTester system CseSystem {
// Local variables
var Timestamp v_creationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent := {subscription_update_invalid := m_contentUpdateSubscription_invalid};
v_updateRequest.primitiveContent.subscription_update_invalid.creationTime := v_creationTime;
f_CSE_DMR_UPD_007(int23, m_createSubscriptionBase, v_updateRequest);//Subscription
if(getverdict == pass){
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.subscription_update_invalid)) {
if(v_primitiveContentRetrieveResource.subscription_update_invalid.creationTime == v_creationTime){
setverdict(fail, __SCOPE__ & ": Error: Creation Time attribute updated")
}
}
}
}
function f_CSE_DMR_UPD_007(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on CseTester {
function f_CSE_DMR_UPD_007(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, out PrimitiveContent p_primitiveContentRetrievedResource) runs on CseTester {
// Local variables
var MsgIn v_response;
......@@ -8398,7 +8865,9 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType)));
}
}
p_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex);
// Postamble
f_cse_postamble_deleteResources();
......@@ -8420,12 +8889,21 @@ module OneM2M_Testcases {
var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
var AttributeAux_list v_nullFields;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_nullFields := {{"expirationTime", omit}};
v_updateRequest.primitiveContent.container.expirationTime := v_expirationTime;
f_CSE_DMR_UPD_008(int3, m_createContainerBase, v_updateRequest, v_nullFields);//Container
if(getverdict == pass){
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.container)) {
if(v_primitiveContentRetrieveResource.container.expirationTime == v_expirationTime){
setverdict(fail, __SCOPE__ & ": Error: Expiration time attribute updated")
}
}
}
}
testcase TC_CSE_DMR_UPD_008_GRP_ET() runs on CseTester system CseSystem {
......@@ -8433,12 +8911,21 @@ module OneM2M_Testcases {
var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var AttributeAux_list v_nullFields;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_nullFields := {{"expirationTime", omit}};
v_updateRequest.primitiveContent.group_.expirationTime := v_expirationTime;
f_CSE_DMR_UPD_008(int9, m_createGroupBase, v_updateRequest, v_nullFields);//Group
if(getverdict == pass){
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.group_)) {
if(v_primitiveContentRetrieveResource.group_.expirationTime == v_expirationTime){
setverdict(fail, __SCOPE__ & ": Error: Expiration time attribute updated")
}
}
}
}
testcase TC_CSE_DMR_UPD_008_ACP_ET() runs on CseTester system CseSystem {
......@@ -8446,12 +8933,21 @@ module OneM2M_Testcases {
var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateAcpBase;
var AttributeAux_list v_nullFields;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_nullFields := {{"expirationTime", omit}};
v_updateRequest.primitiveContent.accessControlPolicy.expirationTime := v_expirationTime;
f_CSE_DMR_UPD_008(int1, m_createAcpBase, v_updateRequest, v_nullFields);//AccessControlPolicy
if(getverdict == pass){
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.accessControlPolicy)) {
if(v_primitiveContentRetrieveResource.accessControlPolicy.expirationTime == v_expirationTime){
setverdict(fail, __SCOPE__ & ": Error: Expiration time attribute updated")
}
}
}
}
testcase TC_CSE_DMR_UPD_008_SCH_ET() runs on CseTester system CseSystem {
......@@ -8459,12 +8955,21 @@ module OneM2M_Testcases {
var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateScheduleBase;
var AttributeAux_list v_nullFields;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_nullFields := {{"expirationTime", omit}};
v_updateRequest.primitiveContent.schedule.expirationTime := v_expirationTime;
f_CSE_DMR_UPD_008(int18, m_createScheduleBase, v_updateRequest, v_nullFields);//Schedule
if(getverdict == pass){
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.schedule)) {
if(v_primitiveContentRetrieveResource.schedule.expirationTime == v_expirationTime){
setverdict(fail, __SCOPE__ & ": Error: Expiration time attribute updated")
}
}
}
}
testcase TC_CSE_DMR_UPD_008_PCH_ET() runs on CseTester system CseSystem {
......@@ -8472,12 +8977,21 @@ module OneM2M_Testcases {
var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase;
var AttributeAux_list v_nullFields;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_nullFields := {{"expirationTime", omit}};
v_updateRequest.primitiveContent.pollingChannel.expirationTime := v_expirationTime;
f_CSE_DMR_UPD_008(int15, m_createPollingChannelBase, v_updateRequest, v_nullFields);//PollingChannel
if(getverdict == pass){
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.pollingChannel)) {
if(v_primitiveContentRetrieveResource.pollingChannel.expirationTime == v_expirationTime){
setverdict(fail, __SCOPE__ & ": Error: Expiration time attribute updated")
}
}
}
}
testcase TC_CSE_DMR_UPD_008_SUB_ET() runs on CseTester system CseSystem {
......@@ -8485,15 +8999,24 @@ module OneM2M_Testcases {
var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var AttributeAux_list v_nullFields;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_nullFields := {{"expirationTime", omit}};
v_updateRequest.primitiveContent.subscription.expirationTime := v_expirationTime;
f_CSE_DMR_UPD_008(int23, m_createSubscriptionBase, v_updateRequest, v_nullFields);//Subscription
if(getverdict == pass){
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.subscription)) {
if(v_primitiveContentRetrieveResource.subscription.expirationTime == v_expirationTime){
setverdict(fail, __SCOPE__ & ": Error: Expiration time attribute updated")
}
}
}
}
function f_CSE_DMR_UPD_008(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, template (omit) AttributeAux_list p_nullFields := omit) runs on CseTester {
function f_CSE_DMR_UPD_008(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, template (omit) AttributeAux_list p_nullFields := omit, out PrimitiveContent p_primitiveContentRetrievedResource) runs on CseTester {
// Local variables
var MsgIn v_response;
......@@ -8539,7 +9062,9 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType)));
}
}
p_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex);
// Postamble
f_cse_postamble_deleteResources();
......@@ -8634,6 +9159,7 @@ module OneM2M_Testcases {
var integer v_contentInstanceIndex := -1;
var template RequestPrimitive v_updateRequest := m_updateContentInstanceBase;
var Labels v_labels:= {"LABEL"};
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.contentInstance.labels := v_labels;
......@@ -8672,7 +9198,17 @@ module OneM2M_Testcases {
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while updating contentInstance");
}
}
}
v_primitiveContentRetrieveResource:=f_cse_retrieveResource(v_contentInstanceIndex);
if(getverdict == pass){
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.contentInstance)) {
if(v_primitiveContentRetrieveResource.contentInstance.labels == v_labels){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute updated")
}
}
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -8698,7 +9234,8 @@ module OneM2M_Testcases {
var integer v_containerIndex := -1;
var integer v_contentInstanceIndex := -1;
var template RequestPrimitive v_updateRequest := m_updateContentInstanceBase;
var Labels v_labels := {"LABEL"};
var Labels v_labels := {"LABEL"};
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.contentInstance.labels := v_labels;
......@@ -8739,7 +9276,17 @@ module OneM2M_Testcases {
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while updating a latest resource");
}
}
}
v_primitiveContentRetrieveResource:=f_cse_retrieveResource(v_contentInstanceIndex);
if(getverdict == pass){
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.contentInstance)) {
if(v_primitiveContentRetrieveResource.contentInstance.labels == v_labels){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute updated")
}
}
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -8766,6 +9313,7 @@ module OneM2M_Testcases {
var integer v_contentInstanceIndex := -1;
var template RequestPrimitive v_updateRequest := m_updateContentInstanceBase;
var Labels v_labels:= {"LABEL"};
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.contentInstance.labels := v_labels;
......@@ -8806,8 +9354,17 @@ module OneM2M_Testcases {
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while updating an oldest resource");
}
}
}
v_primitiveContentRetrieveResource:=f_cse_retrieveResource(v_contentInstanceIndex);
if(getverdict == pass){
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.contentInstance)) {
if(v_primitiveContentRetrieveResource.contentInstance.labels == v_labels){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute updated")
}
}
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -9045,11 +9602,11 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while deleting resource type " & int2str(enum2int(p_resourceType)));
}
}
f_checkCseTesterStatus();
//Check if the resource has been deleted or not
if(f_isResourceNotDeleted(v_resourceIndex)) {
if(f_isResourcePresent(v_resourceIndex)) {
setverdict(pass, __SCOPE__ & ":INFO: Resource not deleted");
} else {
setverdict(fail, __SCOPE__ & ":INFO: Resource deleted");
......@@ -9197,7 +9754,7 @@ module OneM2M_Testcases {
f_cse_deleteResource(valueof(m_deleteRequest(f_getResourceAddress(v_resourceIndex))));
//Test Body
// Test Body
mcaPort.send(m_request(m_deleteRequest(f_getResourceAddress(v_childResourceIndex), f_getOriginator(v_childResourceIndex))));
tc_ac.start;
......@@ -9673,7 +10230,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
......@@ -9682,10 +10239,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));
......@@ -9708,6 +10265,16 @@ module OneM2M_Testcases {
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
if(f_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -9728,6 +10295,7 @@ module OneM2M_Testcases {
var XSD.AnyURI locationServerAddress := PX_LOCATION_SERVER_ADDRESS;
var RequestPrimitive v_request;
var MsgIn v_response;
var integer v_resourceIndex := -1;
//Test component configuration
f_cf01Up();
......@@ -9745,6 +10313,7 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!");
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, v_aeAuxIndex);
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
......@@ -9758,6 +10327,15 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": Timeout due to no response from requested server!");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is present or not
if(f_isResourcePresent(v_resourceIndex)) {
setverdict(pass, __SCOPE__ & ":INFO: Resource created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource not created");
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -9774,7 +10352,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;
......@@ -9795,10 +10373,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));
......@@ -9820,6 +10398,15 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": Timeout due to no response from requested server!");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
if(f_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -9835,7 +10422,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;
......@@ -9847,10 +10434,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));
......@@ -9872,7 +10459,15 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": Timeout due to no response from requested server!");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
if(f_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -9931,7 +10526,11 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": Timeout due to no response from requested server!");
}
}
f_checkCseTesterStatus();
//TODO: Check to see if the resource has been updated or not
// Postamble
f_cse_postamble_deleteResources();
......@@ -9956,7 +10555,7 @@ module OneM2M_Testcases {
var RequestPrimitive v_loc_request_preamble;
var RequestPrimitive v_container_request_preamble;
var MsgIn v_response;
var LocationSource v_locationSource := int1;//Network-based
var LocationSource v_locationSource := int1;//Network-based
//Test component configuration
f_cf01Up();
......@@ -9995,6 +10594,9 @@ module OneM2M_Testcases {
}
}
f_checkCseTesterStatus();
// Postamble
f_cse_postamble_deleteResources();
......@@ -10015,6 +10617,7 @@ module OneM2M_Testcases {
var RequestPrimitive v_request;
var MsgIn v_response;
var LocationSource v_locationSource := int2;//Device-based
var integer v_resourceIndex := -1;
//Test component configuration
f_cf01Up();
......@@ -10033,6 +10636,7 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!");
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, v_aeAuxIndex);
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
......@@ -10045,7 +10649,16 @@ module OneM2M_Testcases {
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": Timeout due to no response from requested server!");
}
}
}
f_checkCseTesterStatus();
//Check to see if the resource is present or not
if(f_isResourcePresent(v_resourceIndex)) {
setverdict(pass, __SCOPE__ & ":INFO: Resource created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource not created");
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -10067,6 +10680,7 @@ module OneM2M_Testcases {
var LocationSource v_locationSource := int3;//Share-based
var RequestPrimitive v_request;
var MsgIn v_response;
var integer v_resourceIndex := -1;
//Test component configuration
f_cf01Up();
......@@ -10086,6 +10700,7 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!");
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, v_aeAuxIndex);
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
......@@ -10098,7 +10713,16 @@ module OneM2M_Testcases {
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": Timeout due to no response from requested server!");
}
}
}
f_checkCseTesterStatus();
//Check to see if the resource is present or not
if(f_isResourcePresent(v_resourceIndex)) {
setverdict(pass, __SCOPE__ & ":INFO: Resource created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource not created");
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -10354,7 +10978,7 @@ module OneM2M_Testcases {
setverdict(pass, __SCOPE__ & "Subscription resource is successfully!");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response{
......@@ -10459,6 +11083,7 @@ module OneM2M_Testcases {
var ListOfURIs v_memberIDs;
var template RequestPrimitive v_createRequest;
var ResponsePrimitive v_responsePrimitive;
var boolean v_resourceCreated := false;
// Test control
......@@ -10500,6 +11125,16 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
if(f_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -10570,7 +11205,16 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
if(f_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
}
// Postamble
f_cse_postamble_deleteResources();
......@@ -10997,6 +11641,7 @@ module OneM2M_Testcases {
var RequestPrimitive v_updateRequest := valueof(m_updateGroupBase);
var XSD.AnyURI v_memberId_1;
var XSD.AnyURI v_memberId_2;
var PrimitiveContent v_primitiveContentRetrievedResource;
// Test control
......@@ -11049,6 +11694,15 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while updating resource");
}
}
v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_groupIndex);
if(getverdict == pass){
if(ischosen(v_primitiveContentRetrievedResource.group_)){
if(v_primitiveContentRetrievedResource.group_.memberIDs[0] != v_memberId_2){
setverdict(fail, __SCOPE__, ": Error, memberIDs attribute not updated");
}
}
}
//Postamble
f_cse_postamble_deleteResources();
......@@ -11072,6 +11726,7 @@ module OneM2M_Testcases {
var integer v_containerIndex_2 := -1;
var integer v_groupIndex := -1;
var RequestPrimitive v_updateRequest := valueof(m_updateGroupBase);
var PrimitiveContent v_primitiveContentRetrievedResource;
// Test control
......@@ -11110,14 +11765,23 @@ module OneM2M_Testcases {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while updating resource");
}
[] tc_ac.timeout {
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while updating resource");
}
}
}
v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_groupIndex);
if(getverdict == pass){
if(ischosen(v_primitiveContentRetrievedResource.group_)){
if(v_primitiveContentRetrievedResource.group_.memberTypeValidated == false){
setverdict(fail, __SCOPE__, ": Error, memberTypeValidated attribute not updated");
}
}
}
//Postamble
f_cse_postamble_deleteResources();
......@@ -11143,6 +11807,7 @@ module OneM2M_Testcases {
var integer v_subGroupIndex := -1;
var XSD.AnyURI v_memberId_1;
var XSD.AnyURI v_memberId_2;
var PrimitiveContent v_primitiveContentRetrievedResource;
// Test control
......@@ -11203,6 +11868,19 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
}
}
v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_groupIndex);
if(getverdict == pass){
if(ischosen(v_primitiveContentRetrievedResource.group_)){
if(v_primitiveContentRetrievedResource.group_.memberTypeValidated == false){
setverdict(fail, __SCOPE__, ": Error, memberTypeValidated attribute not updated");
}
if(v_primitiveContentRetrievedResource.group_.memberType != int0){
setverdict(fail, __SCOPE__, ": Error, memberType attribute not set to MIXED");
}
}
}
//Postamble
f_cse_postamble_deleteResources();
......@@ -11228,6 +11906,7 @@ module OneM2M_Testcases {
var integer v_subGroupIndex := -1;
var XSD.AnyURI v_memberId_1;
var XSD.AnyURI v_memberId_2;
var PrimitiveContent v_primitiveContentRetrievedResource;
// Test control
......@@ -11283,14 +11962,27 @@ module OneM2M_Testcases {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while updating resource");
}
[] tc_ac.timeout {
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while updating resource");
}
}
}
v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_groupIndex);
if(getverdict == pass){
if(ischosen(v_primitiveContentRetrievedResource.group_)){
if(v_primitiveContentRetrievedResource.group_.memberTypeValidated == false){
setverdict(fail, __SCOPE__, ": Error, memberTypeValidated attribute not updated");
}
if(v_primitiveContentRetrievedResource.group_.memberIDs[0] != v_memberId_1){
setverdict(fail, __SCOPE__, ": Error, memberIDs attribute not correct");
}
}
}
//Postamble
f_cse_postamble_deleteResources();
......@@ -11382,6 +12074,7 @@ module OneM2M_Testcases {
var integer v_groupIndex, v_containerIndex_1, v_containerIndex_2, v_containerIndex_3 := -1;
var ListOfURIs v_memberIDs;
var template RequestPrimitive v_createRequest;
var PrimitiveContent v_primitiveContentRetrievedResource;
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var template RequestPrimitive v_createMember;
......@@ -11418,18 +12111,28 @@ module OneM2M_Testcases {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": operation is not allowed");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error update successful while maxNrOfMembers has exceeded");
}
[] tc_ac.timeout {
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
}
}
}
v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_groupIndex);
if(getverdict == pass){
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrievedResource.group_)) {
if(v_primitiveContentRetrievedResource.group_.memberIDs == v_memberIDs){
setverdict(fail, __SCOPE__ & ": Error: MemberIDs attribute updated")
}
}
}
//Postamble
f_cse_postamble_deleteResources();
......@@ -11455,6 +12158,7 @@ module OneM2M_Testcases {
var integer v_groupIndex := -1;
var ListOfURIs v_memberIDs;
var XSD.PositiveInteger v_maxNrOfMembers:= 1;
var PrimitiveContent v_primitiveContentRetrievedResource;
v_updateRequest.primitiveContent.group_.maxNrOfMembers := v_maxNrOfMembers;
......@@ -11494,6 +12198,16 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while updating resource");
}
}
v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_groupIndex);
if(getverdict == pass){
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrievedResource.group_)) {
if(v_primitiveContentRetrievedResource.group_.maxNrOfMembers == v_maxNrOfMembers){
setverdict(fail, __SCOPE__ & ": Error: maxNrOfMembers attribute updated")
}
}
}
//Postamble
f_cse_postamble_deleteResources();
......@@ -11530,6 +12244,7 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createGroupBase;
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var template RequestPrimitive v_createMember;
var PrimitiveContent v_primitiveContentRetrievedResource;
// Test control
......@@ -11595,6 +12310,19 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
}
}
v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_groupIndex);
if(getverdict == pass){
if(ischosen(v_primitiveContentRetrievedResource.group_)){
if(v_primitiveContentRetrievedResource.group_.memberTypeValidated != false){
setverdict(fail, __SCOPE__, ": Error, memberTypeValidated attribute not updated");
}
if((v_primitiveContentRetrievedResource.group_.memberIDs[0] != c_memberResourceAddress1) and (v_primitiveContentRetrievedResource.group_.memberIDs[1] != c_memberResourceAddress2)){
setverdict(fail, __SCOPE__, ": Error, memberIDs attribute not correct");
}
}
}
//Postamble
f_cse_postamble_deleteResources();
......@@ -12152,7 +12880,7 @@ module OneM2M_Testcases {
v_containerIndex_2 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource
v_memberIDs := {f_getResourceId(vc_resourcesList[v_containerIndex_1].resource), f_getResourceId(vc_resourcesList[v_containerIndex_2].resource)};
v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int3, -, -), v_aeIndex); // AE child resource
p_requestPrimitive.to_ := f_getResourceAddress(v_groupIndex) & "/fopt";
p_requestPrimitive.from_ := f_getOriginator(v_aeIndex);
......@@ -12815,8 +13543,17 @@ module OneM2M_Testcases {
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while creating resource");
}
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
if(f_isResourceNotPresent(v_resourceIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
}
//Postamble
f_cse_postamble_deleteResources();
......@@ -12871,6 +13608,15 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
if(f_isResourceNotPresent(v_contentInstanceResourceIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
}
//Postamble
f_cse_postamble_deleteResources();
......@@ -12934,6 +13680,15 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
if(f_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
}
//Postamble
f_cse_postamble_deleteResources();
......@@ -12991,6 +13746,15 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
if(f_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
}
//Postamble
f_cse_postamble_deleteResources();
......@@ -13013,7 +13777,7 @@ module OneM2M_Testcases {
var MsgIn v_response;
var integer v_aeIndex := -1;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var template RequestPrimitive v_request;
var RequestPrimitive v_request;
var CseTester v_notifyHandler;
var integer v_ae2Index := -1;
......@@ -13032,7 +13796,7 @@ module OneM2M_Testcases {
// Test Body
v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription
mcaPort.send(m_request(valueof(v_request)));
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
......@@ -13052,6 +13816,15 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
if(f_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
}
//Postamble
f_cse_postamble_deleteResources();
......@@ -13074,7 +13847,7 @@ module OneM2M_Testcases {
var MsgIn v_response;
var integer v_aeIndex := -1;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var template RequestPrimitive v_request;
var RequestPrimitive v_request;
var CseTester v_notifyHandler;
var integer v_ae2Index := -1;
......@@ -13093,7 +13866,7 @@ module OneM2M_Testcases {
// Test Body
v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription
mcaPort.send(m_request(valueof(v_request)));
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
......@@ -13113,6 +13886,15 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while creating resource");
}
}
f_checkCseTesterStatus();
//Check to see if the resource is NOT present
if(f_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
}
//Postamble
f_cse_postamble_deleteResources();
......@@ -14354,6 +15136,8 @@ module OneM2M_Testcases {
var RequestPrimitive v_createRequest := valueof(m_createAcpBase);
var AccessControlRule v_accessControlRule_1 := valueof(m_createAcr({PX_SUPER_USER}, int63));
var AccessControlRule v_accessControlRule_2 := valueof(m_createAcr({"wait"}, int55));
const ResourceType c_accessControlPolicyType := int1;
// Test control
// Test component configuration
......@@ -14372,27 +15156,32 @@ module OneM2M_Testcases {
v_contentResponse.accessControlPolicy.privileges.accessControlRule_list[1].accessControlOriginators := {f_getOriginator(v_aeIndex)};
// Test Body
v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource
v_createRequest := f_getCreateRequestPrimitive(c_accessControlPolicyType, v_createRequest, -1);
mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_acpIndex), f_getOriginator(v_acpIndex))));
mcaPort.send(m_request(v_createRequest));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Response OK for retrieving");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements");
setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(c_accessControlPolicyType)) & " created successfully");
v_acpIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int1);
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while retrieving resource");
setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(c_accessControlPolicyType)));
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(c_accessControlPolicyType)));
}
}
f_checkCseTesterStatus();
//Check to see if the resource is present or not
if(f_isResourcePresent(v_acpIndex)) {
setverdict(pass, __SCOPE__ & ":INFO: Resource created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource not created");
}
//Postamble
......@@ -14419,6 +15208,8 @@ module OneM2M_Testcases {
var RequestPrimitive v_createRequest := valueof(m_createAcpBase);
var AccessControlRule v_accessControlRule_1 := valueof(m_createAcr({PX_SUPER_USER}, int63));
var AccessControlRule v_accessControlRule_2 := valueof(m_createAcr({"wait"}, int55));
const ResourceType c_accessControlPolicyType := int1;
// Test control
// Test component configuration
......@@ -14437,27 +15228,32 @@ module OneM2M_Testcases {
v_contentResponse.accessControlPolicy.selfPrivileges.accessControlRule_list[1].accessControlOriginators := {f_getOriginator(v_aeIndex)};
// Test Body
v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource
v_createRequest := f_getCreateRequestPrimitive(c_accessControlPolicyType, v_createRequest, -1);// CSE child resource
mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_acpIndex), f_getOriginator(v_acpIndex))));
mcaPort.send(m_request(v_createRequest));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Response OK for retrieving");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements");
setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(c_accessControlPolicyType)) & " created successfully");
v_acpIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, c_accessControlPolicyType);
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while retrieving resource");
setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(c_accessControlPolicyType)));
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(c_accessControlPolicyType)));
}
}
f_checkCseTesterStatus();
//Check to see if the resource is present or not
if(f_isResourcePresent(v_acpIndex)) {
setverdict(pass, __SCOPE__ & ":INFO: Resource created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource not created");
}
//Postamble
......@@ -14563,7 +15359,7 @@ module OneM2M_Testcases {
log(__SCOPE__ & ":INFO: No answer while updating resource type ACP");
}
}
f_cse_postamble_deleteResources();
//Tear down
......@@ -14641,6 +15437,7 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource type int2 (Ae)");
}
}
//Postamble
f_cse_postamble_deleteResources();
......@@ -15017,6 +15814,7 @@ module OneM2M_Testcases {
var AccessControlRule v_accessControlRule_2;
var SetOfAcrs v_setOfArcs_1;
var SetOfAcrs v_setOfArcs_2;
var PrimitiveContent v_primitiveContentRetrievedResource;
// Test control
......@@ -15063,6 +15861,15 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while executing update operation on resource type int2 (Ae)");
}
}
v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_aeIndex);
if(getverdict == pass){
if(ischosen(v_primitiveContentRetrievedResource.aE)) {
if(not match (v_primitiveContentRetrievedResource.aE.accessControlPolicyIDs, valueof(v_updateRequest.primitiveContent.aE.accessControlPolicyIDs))){
setverdict(fail, __SCOPE__ & ": Error: Access Control policy ID attribute not updated correctly")
}
}
}
//Postamble
f_cse_postamble_deleteResources();
......@@ -15092,6 +15899,7 @@ module OneM2M_Testcases {
var AccessControlRule v_accessControlRule_2;
var SetOfAcrs v_setOfArcs_1;
var SetOfAcrs v_setOfArcs_2;
var PrimitiveContent v_primitiveContentRetrievedResource;
// Test control
......@@ -15138,6 +15946,15 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource type int3 (Container)");
}
}
v_primitiveContentRetrievedResource := f_cse_retrieveResource(v_aeIndex);
if(getverdict == pass){
if(ischosen(v_primitiveContentRetrievedResource.aE)) {
if(match(v_primitiveContentRetrievedResource.aE.accessControlPolicyIDs, valueof(v_updateRequest.primitiveContent.aE.accessControlPolicyIDs))){
setverdict(fail, __SCOPE__ & ": Error: Access Control policy ID attribute updated")
}
}
}
//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