Commit 6a390016 authored by Antonio Castillo Verdugo's avatar Antonio Castillo Verdugo
Browse files

Fix #12 and #17

parent ea091c23
......@@ -4324,60 +4324,6 @@ module OneM2M_PermutationFunctions {
}//end f_CSE_DMR_UPD_004
function f_CSE_DMR_UPD_005(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu {
// Local variables
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_ae2Index := -1;
var integer v_resourceIndex := -1;
// Test control
// Test component configuration
f_cf01Up(true);
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive , v_aeIndex);
// Test Body
v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": It is not possible to update an unexisting attribute of resource type " & int2str(enum2int(p_resourceType)));
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while updating an unexisting resource type " & int2str(enum2int(p_resourceType)));
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType)));
}
}
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}//end f_CSE_DMR_UPD_005
function f_CSE_DMR_UPD_006(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu {
// Local variables
......@@ -4553,38 +4499,39 @@ module OneM2M_PermutationFunctions {
}//end f_CSE_DMR_UPD_008
function f_CSE_DMR_UPD_009(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, template (omit) AttributeAux_list p_nullFields := omit) runs on AeSimu {
function f_CSE_DMR_UPD_009(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu {
// Local variables
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
var integer v_ae2Index := -1;
var integer v_resourceIndex := -1;
// Test control
// Test component configuration
f_cf01Up(true);
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_aeIndex);
v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive , v_aeIndex);
// Test Body
v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4102))) -> value v_response {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Operation not allowed. Attribute not updated with an unacceptable value");
setverdict(pass, __SCOPE__ & ": It is not possible to update an unexisting attribute of resource type " & int2str(enum2int(p_resourceType)));
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
......@@ -4592,21 +4539,19 @@ module OneM2M_PermutationFunctions {
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Attribute has been updated with an unacceptable value");
setverdict(fail, __SCOPE__ & ": Error while updating an unexisting resource type " & int2str(enum2int(p_resourceType)));
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType)));
}
}
vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex);
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}//end f_CSE_DMR_UPD_009
function f_CSE_DMR_UPD_014(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu {
......
......@@ -126,10 +126,10 @@ module OneM2M_TestControl_IN_profile {
if(PICS_CNT_LBL) {execute (TC_CSE_DMR_UPD_002_CNT_LBL());}
if(PICS_CNT_LBL) {execute (TC_CSE_DMR_UPD_003_CNT_LBL());}
if(PICS_CNT_MNI and PICS_CNT_LBL) {execute (TC_CSE_DMR_UPD_004_CNT_ET_MNI_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_005_CNT_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_005());}
if(true) {execute (TC_CSE_DMR_UPD_007_CNT_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_CNT_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_CNT_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_CNT_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_010 ());}
if(true) {execute (TC_CSE_DMR_UPD_016_CNT_ET());}
if(true) {execute (TC_CSE_DMR_DEL_001_CNT());}
......@@ -185,10 +185,9 @@ module OneM2M_TestControl_IN_profile {
if(PICS_SUB_LBL) {execute (TC_CSE_DMR_UPD_002_SUB_LBL());}
if(PICS_SUB_LBL) {execute (TC_CSE_DMR_UPD_003_SUB_LBL());}
if(PICS_SUB_LBL and PICS_SUB_EXC) {execute (TC_CSE_DMR_UPD_004_SUB_ET_LBL_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_005_SUB_MNI());}
if(true) {execute (TC_CSE_DMR_UPD_007_SUB_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_SUB_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_SUB_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_SUB_MNI());}
if(true) {execute (TC_CSE_DMR_UPD_016_SUB_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_SUB_NU());}
if(true) {execute (TC_CSE_DMR_UPD_016_SUB_NCT());}
......@@ -218,10 +217,9 @@ module OneM2M_TestControl_IN_profile {
if(PICS_ACP_LBL) {execute (TC_CSE_DMR_UPD_002_ACP_LBL());}
if(PICS_ACP_LBL) {execute (TC_CSE_DMR_UPD_003_ACP_LBL());}
if(PICS_ACP_AT and PICS_ACP_LBL) {execute (TC_CSE_DMR_UPD_004_ACP_PV_AT_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_005_ACP_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_007_ACP_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_ACP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_ACP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_ACP_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_016_ACP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_ACP_PV());}
if(true) {execute (TC_CSE_DMR_UPD_016_ACP_PVS());}
......@@ -336,11 +334,10 @@ module OneM2M_TestControl_IN_profile {
if(PICS_GRP_LBL) {execute (TC_CSE_DMR_UPD_002_GRP_LBL());}
if(PICS_GRP_LBL) {execute (TC_CSE_DMR_UPD_003_GRP_LBL());}
if(PICS_GRP_GN and PICS_GRP_LBL) {execute (TC_CSE_DMR_UPD_004_GRP_ET_GN_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_005_GRP_EXC());}
if(PICS_ACP_SUPPORT) {execute (TC_CSE_DMR_UPD_006_GRP_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_007_GRP_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_GRP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_GRP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_GRP_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_016_GRP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_GRP_MNM());}
if(true) {execute (TC_CSE_DMR_UPD_016_GRP_MID());}
......
......@@ -149,10 +149,10 @@ module OneM2M_TestControl_MN_profile {
if(PICS_CNT_LBL) {execute (TC_CSE_DMR_UPD_002_CNT_LBL());}
if(PICS_CNT_LBL) {execute (TC_CSE_DMR_UPD_003_CNT_LBL());}
if(PICS_CNT_MNI and PICS_CNT_LBL) {execute (TC_CSE_DMR_UPD_004_CNT_ET_MNI_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_005_CNT_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_005());}
if(true) {execute (TC_CSE_DMR_UPD_007_CNT_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_CNT_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_CNT_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_CNT_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_010());}
if(true) {execute (TC_CSE_DMR_UPD_016_CNT_ET());}
if(true) {execute (TC_CSE_DMR_DEL_001_CNT());}
......@@ -208,10 +208,9 @@ module OneM2M_TestControl_MN_profile {
if(PICS_SUB_LBL) {execute (TC_CSE_DMR_UPD_002_SUB_LBL());}
if(PICS_SUB_LBL) {execute (TC_CSE_DMR_UPD_003_SUB_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_004_SUB_ET_LBL_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_005_SUB_MNI());}
if(true) {execute (TC_CSE_DMR_UPD_007_SUB_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_SUB_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_SUB_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_SUB_MNI());}
if(true) {execute (TC_CSE_DMR_UPD_016_SUB_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_SUB_NU());}
if(true) {execute (TC_CSE_DMR_UPD_016_SUB_NCT());}
......@@ -241,10 +240,9 @@ module OneM2M_TestControl_MN_profile {
if(PICS_ACP_LBL) {execute (TC_CSE_DMR_UPD_002_ACP_LBL());}
if(PICS_ACP_LBL) {execute (TC_CSE_DMR_UPD_003_ACP_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_004_ACP_PV_AT_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_005_ACP_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_007_ACP_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_ACP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_ACP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_ACP_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_016_ACP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_ACP_PV());}
if(true) {execute (TC_CSE_DMR_UPD_016_ACP_PVS());}
......@@ -358,11 +356,10 @@ module OneM2M_TestControl_MN_profile {
if(PICS_GRP_LBL) {execute (TC_CSE_DMR_UPD_002_GRP_LBL());}
if(PICS_GRP_LBL) {execute (TC_CSE_DMR_UPD_003_GRP_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_004_GRP_ET_GN_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_005_GRP_EXC());}
if(PICS_ACP_SUPPORT) {execute (TC_CSE_DMR_UPD_006_GRP_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_007_GRP_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_GRP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_GRP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_GRP_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_016_GRP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_GRP_MNM());}
if(true) {execute (TC_CSE_DMR_UPD_016_GRP_MID());}
......
......@@ -5129,75 +5129,73 @@ module OneM2M_Testcases_CSE_Release_1 {
}
}
} // end g_CSE_DMR_UPD_004
group g_CSE_DMR_UPD_005{
} // end g_CSE_DMR_UPD_004
/**
* @desc Check that the IUT responds with an error when the AE tries to update an attribute of a TARGET_RESOURCE_ADDRESS resource which does not exist
*
*/
testcase TC_CSE_DMR_UPD_005_CNT_EXC() runs on Tester system CseSystem {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var XSD.PositiveInteger v_expirationCounter := 1;
var template RequestPrimitive v_createRequest := m_createContainerBase;
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
v_updateRequest.primitiveContent := {container_update_invalid := m_contentUpdateContainer_invalid};
v_updateRequest.primitiveContent.container_update_invalid.expirationCounter := v_expirationCounter;
v_ae1.start(f_CSE_DMR_UPD_005(int3, v_createRequest, v_updateRequest));//Container
v_ae1.done;
}
testcase TC_CSE_DMR_UPD_005_GRP_EXC() runs on Tester system CseSystem {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var XSD.PositiveInteger v_expirationCounter := 1;
var template RequestPrimitive v_createRequest := m_createGroupBase;
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
v_updateRequest.primitiveContent := {group_update_invalid := m_contentUpdateGroup_invalid};
v_updateRequest.primitiveContent.group_update_invalid.expirationCounter := v_expirationCounter;
v_ae1.start(f_CSE_DMR_UPD_005(int9, v_createRequest, v_updateRequest));//Group
v_ae1.done;
}
/**
* @desc Check that the IUT responds with an error when the AE tries to update an attribute of a TARGET_RESOURCE_ADDRESS resource when the resource does not exist
*
*/
testcase TC_CSE_DMR_UPD_005() runs on AeSimu system CseSystem {
//Local variables
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var ResourceType v_resourceType := int3; //container
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
var XSD.ID v_resourceId := "nonExistingId";
var XSD.ID v_resourceName := "nonExistingName";
var XSD.ID v_targetResourceAddress;
// Test control
testcase TC_CSE_DMR_UPD_005_ACP_EXC() runs on Tester system CseSystem {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var XSD.PositiveInteger v_expirationCounter := 1;
var template RequestPrimitive v_createRequest := m_createAcpBase;
var template RequestPrimitive v_updateRequest := m_updateAcpBase;
v_updateRequest.primitiveContent := {aCP_update_invalid := m_contentUpdateAcp_invalid};
v_updateRequest.primitiveContent.aCP_update_invalid.expirationCounter := v_expirationCounter;
v_ae1.start(f_CSE_DMR_UPD_005(int1, v_createRequest, v_updateRequest));//AccessControlPolicy
v_ae1.done;
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
// Test Body
if((PX_ADDRESSING_METHOD == e_nonHierarchical) and (PX_PRIMITIVE_SCOPE == e_cseRelative)) {
v_targetResourceAddress := v_resourceId;
} else if (PX_ADDRESSING_METHOD == e_nonHierarchical) {
v_targetResourceAddress := f_getResourceAddress() & "/" & v_resourceId;
} else {
v_targetResourceAddress := f_getResourceAddress(v_aeIndex) & "/" & v_resourceName;
}
testcase TC_CSE_DMR_UPD_005_SUB_MNI() runs on Tester system CseSystem {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var XSD.NonNegativeInteger v_maxNrOfInstances := 5;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
v_updateRequest.primitiveContent := {subscription_update_invalid := m_contentUpdateSubscription_invalid};
v_updateRequest.primitiveContent.subscription_update_invalid.maxNrOfInstances := v_maxNrOfInstances;
v_request := f_getUpdateRequestPrimitive(v_resourceType, v_aeIndex, v_updateRequest);
v_request.to_ := v_targetResourceAddress;
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))){
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Operation not allowed because resource does not exist");
}
[] 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__ & ": Attribute has been updated in a non existing resource");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(v_resourceType)));
}
}
v_ae1.start(f_CSE_DMR_UPD_005(int23, v_createRequest, v_updateRequest));//Subscription
v_ae1.done;
}
f_checkAeSimuStatus();
} // end g_CSE_DMR_UPD_005
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}
group g_CSE_DMR_UPD_006{
......@@ -5524,96 +5522,64 @@ module OneM2M_Testcases_CSE_Release_1 {
* @desc Check that the IUT responds with an error when the AE tries to update a RW attribute ATTRIBUTE_NAME of the TARGET_RESOURCE_ADDRESS resource with an UNACCEPTABLE_VALUE
*
*/
testcase TC_CSE_DMR_UPD_009_CNT_ET() runs on Tester system CseSystem {
testcase TC_CSE_DMR_UPD_009_CNT_EXC() runs on Tester system CseSystem {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var Timestamp v_expirationTime := "20001231T012345";
var XSD.PositiveInteger v_expirationCounter := 1;
var template RequestPrimitive v_createRequest := m_createContainerBase;
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent := {container_update_invalid := m_contentUpdateContainer_invalid};
v_updateRequest.primitiveContent.container.expirationTime := v_expirationTime;
v_ae1.start(f_CSE_DMR_UPD_009(int3, m_createContainerBase, v_updateRequest));//Container
v_updateRequest.primitiveContent.container_update_invalid.expirationCounter := v_expirationCounter;
v_ae1.start(f_CSE_DMR_UPD_009(int3, v_createRequest, v_updateRequest));//Container
v_ae1.done;
if(getverdict == pass){
v_primitiveContentRetrieveResource := f_getPrimitiveContentRetrievedResource(v_ae1);
//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_009_ACP_ET() runs on Tester system CseSystem {
testcase TC_CSE_DMR_UPD_009_GRP_EXC() runs on Tester system CseSystem {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateAcpBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.accessControlPolicy.expirationTime := v_expirationTime;
v_ae1.start(f_CSE_DMR_UPD_009(int1, m_createAcpBase, v_updateRequest));//AccessControlPolicy
var XSD.PositiveInteger v_expirationCounter := 1;
var template RequestPrimitive v_createRequest := m_createGroupBase;
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
v_updateRequest.primitiveContent := {group_update_invalid := m_contentUpdateGroup_invalid};
v_updateRequest.primitiveContent.group_update_invalid.expirationCounter := v_expirationCounter;
v_ae1.start(f_CSE_DMR_UPD_009(int9, v_createRequest, v_updateRequest));//Group
v_ae1.done;
if(getverdict == pass){
v_primitiveContentRetrieveResource := f_getPrimitiveContentRetrievedResource(v_ae1);
//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_009_SUB_ET() runs on Tester system CseSystem {
testcase TC_CSE_DMR_UPD_009_ACP_EXC() runs on Tester system CseSystem {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
var XSD.PositiveInteger v_expirationCounter := 1;
var template RequestPrimitive v_createRequest := m_createAcpBase;
var template RequestPrimitive v_updateRequest := m_updateAcpBase;
v_updateRequest.primitiveContent.subscription.expirationTime := v_expirationTime;
v_updateRequest.primitiveContent := {aCP_update_invalid := m_contentUpdateAcp_invalid};
v_updateRequest.primitiveContent.aCP_update_invalid.expirationCounter := v_expirationCounter;
v_ae1.start(f_CSE_DMR_UPD_009(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
v_ae1.start(f_CSE_DMR_UPD_009(int1, v_createRequest, v_updateRequest));//AccessControlPolicy
v_ae1.done;
if(getverdict == pass){
v_primitiveContentRetrieveResource := f_getPrimitiveContentRetrievedResource(v_ae1);
//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")
}
}
}
}
testcase TC_CSE_DMR_UPD_009_GRP_ET() runs on Tester system CseSystem {
testcase TC_CSE_DMR_UPD_009_SUB_MNI() runs on Tester system CseSystem {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.group_.expirationTime := v_expirationTime;
v_ae1.start(f_CSE_DMR_UPD_009(int9, m_createGroupBase, v_updateRequest));//Group
var XSD.NonNegativeInteger v_maxNrOfInstances := 5;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
v_updateRequest.primitiveContent := {subscription_update_invalid := m_contentUpdateSubscription_invalid};
v_updateRequest.primitiveContent.subscription_update_invalid.maxNrOfInstances := v_maxNrOfInstances;
v_ae1.start(f_CSE_DMR_UPD_009(int23, v_createRequest, v_updateRequest));//Subscription
v_ae1.done;
if(getverdict == pass){
v_primitiveContentRetrieveResource := f_getPrimitiveContentRetrievedResource(v_ae1);
//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")
}
}
}
}
} // end g_CSE_DMR_UPD_009
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment