Skip to content
Snippets Groups Projects
Commit b883836f authored by Pramod Kulkarni's avatar Pramod Kulkarni
Browse files

Additional TTCN changes to check if "the IUT updates the RESOURCE_TYPE...

Additional TTCN changes to check if "the IUT updates the RESOURCE_TYPE resource" for DMR/UPD/018 and DMR/UPD/017 and its variants
parent 4f16f188
No related branches found
No related tags found
2 merge requests!25Ae fixes,!22Stf531 dmr testcases
......@@ -8704,6 +8704,7 @@ module OneM2M_Testcases {
var Labels v_labels := {"MyLabel"};
var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.remoteCSE.labels := v_labels;
......@@ -8717,6 +8718,13 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.remoteCSE)) {
if(v_primitiveContentRetrieveResource.remoteCSE.labels != v_labels){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
......@@ -8724,6 +8732,7 @@ module OneM2M_Testcases {
var PoaList v_poaList := {"http://" & PX_AE2_ADDRESS & "/"};
var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.remoteCSE.pointOfAccess := v_poaList;
......@@ -8737,13 +8746,21 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.remoteCSE)) {
if(v_primitiveContentRetrieveResource.remoteCSE.pointOfAccess != v_poaList){
setverdict(fail, __SCOPE__ & ": Error: Point of access attribute not updated correctly")
}
}
}
}
}
testcase TC_CSE_DMR_UPD_017_CSR_NL() runs on CseTester system CseSystem {
var XSD.AnyURI v_nodeLink := "MyNodeId";
var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.remoteCSE.nodeLink := v_nodeLink;
......@@ -8757,7 +8774,14 @@ module OneM2M_Testcases {
}
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.remoteCSE)) {
if(v_primitiveContentRetrieveResource.remoteCSE.nodeLink != v_nodeLink){
setverdict(fail, __SCOPE__ & ": Error: Node link attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_NOD_LBL() runs on CseTester system CseSystem {
......@@ -8765,6 +8789,7 @@ module OneM2M_Testcases {
const AttributeAux c_optionalAttribute := {"labels", omit};
var template RequestPrimitive v_updateRequest := m_updateNodeBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.node.labels := v_labels;
......@@ -8778,6 +8803,13 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.node)) {
if(v_primitiveContentRetrieveResource.node.labels != v_labels){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
......@@ -8859,7 +8891,7 @@ module OneM2M_Testcases {
testcase TC_CSE_DMR_UPD_017_SUB_LN() runs on CseTester system CseSystem {
}
function f_CSE_DMR_UPD_017(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on CseTester return ResponsePrimitive {
function f_CSE_DMR_UPD_017(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;
var RequestPrimitive v_request;
......@@ -8910,6 +8942,8 @@ module OneM2M_Testcases {
setverdict(fail, testcasename() & ": No answer while updating resource type " & int2str(enum2int(p_resourceType)));
}
}
p_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex);
//Postamble
f_cse_postamble_deleteResources();
......@@ -8928,6 +8962,7 @@ module OneM2M_Testcases {
var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.remoteCSE.expirationTime := v_expirationTime;
......@@ -8942,6 +8977,13 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.remoteCSE)) {
if(v_primitiveContentRetrieveResource.remoteCSE.expirationTime != v_expirationTime){
setverdict(fail, __SCOPE__ & ": Error: Expiration time attribute not updated correctly")
}
}
}
}
......@@ -8949,6 +8991,7 @@ module OneM2M_Testcases {
var XSD.Boolean v_requestReachability := true;
var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.remoteCSE.requestReachability := v_requestReachability;
......@@ -8962,6 +9005,13 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.remoteCSE)) {
if(v_primitiveContentRetrieveResource.remoteCSE.requestReachability != v_requestReachability){
setverdict(fail, __SCOPE__ & ": Error: Request Reachability attribute not updated correctly")
}
}
}
}
......@@ -8969,6 +9019,7 @@ module OneM2M_Testcases {
var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateNodeBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.node.expirationTime := v_expirationTime;
......@@ -8982,13 +9033,21 @@ module OneM2M_Testcases {
}
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.node)) {
if(v_primitiveContentRetrieveResource.node.expirationTime != v_expirationTime){
setverdict(fail, __SCOPE__ & ": Error: Expiration time attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_018_NOD_NI() runs on CseTester system CseSystem {
var template RequestPrimitive v_updateRequest := m_updateNodeBase;
var XSD.Token v_targetId := "TARGET-ID";
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.node.nodeID := v_targetId;
......@@ -9002,6 +9061,13 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.node)) {
if(v_primitiveContentRetrieveResource.node.nodeID != v_targetId){
setverdict(fail, __SCOPE__ & ": Error: NodeID attribute not updated correctly")
}
}
}
}
......@@ -9009,6 +9075,7 @@ module OneM2M_Testcases {
var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateAE;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.aE.expirationTime := v_expirationTime;
......@@ -9022,6 +9089,13 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.aE)) {
if(v_primitiveContentRetrieveResource.aE.expirationTime != v_expirationTime){
setverdict(fail, __SCOPE__ & ": Error: Expiration time attribute not updated correctly")
}
}
}
}
......@@ -9029,6 +9103,7 @@ module OneM2M_Testcases {
var XSD.Boolean v_requestReachability := true;
var template RequestPrimitive v_updateRequest := m_updateAE;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.aE.requestReachability := v_requestReachability;
......@@ -9042,6 +9117,13 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.aE)) {
if(v_primitiveContentRetrieveResource.aE.requestReachability != v_requestReachability){
setverdict(fail, __SCOPE__ & ": Error: Request Reachability attribute not updated correctly")
}
}
}
}
......@@ -9049,6 +9131,7 @@ module OneM2M_Testcases {
var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.container.expirationTime := v_expirationTime;
......@@ -9062,6 +9145,13 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.container)) {
if(v_primitiveContentRetrieveResource.container.expirationTime != v_expirationTime){
setverdict(fail, __SCOPE__ & ": Error: Expiration time attribute not updated correctly")
}
}
}
}
......@@ -9069,6 +9159,7 @@ module OneM2M_Testcases {
var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateAcpBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.accessControlPolicy.expirationTime := v_expirationTime;
......@@ -9082,6 +9173,13 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.accessControlPolicy)) {
if(v_primitiveContentRetrieveResource.accessControlPolicy.expirationTime != v_expirationTime){
setverdict(fail, __SCOPE__ & ": Error: Expiration time attribute not updated correctly")
}
}
}
}
......@@ -9099,6 +9197,7 @@ module OneM2M_Testcases {
}
var template RequestPrimitive v_updateRequest := m_updateAcpBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.accessControlPolicy.privileges := v_privileges_1;
v_responsePrimitive := f_CSE_DMR_UPD_018(int1, m_createAcpBase, v_updateRequest);//AccessControlPolicy
......@@ -9111,6 +9210,13 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.accessControlPolicy)) {
if(v_primitiveContentRetrieveResource.accessControlPolicy.privileges != v_privileges_1){
setverdict(fail, __SCOPE__ & ": Error: Privileges attribute not updated correctly")
}
}
}
}
......@@ -9128,6 +9234,7 @@ module OneM2M_Testcases {
}
var template RequestPrimitive v_updateRequest := m_updateAcpBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.accessControlPolicy.selfPrivileges := v_privileges_1;
v_responsePrimitive := f_CSE_DMR_UPD_018(int1, m_createAcpBase, v_updateRequest);//AccessControlPolicy
......@@ -9140,6 +9247,13 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.accessControlPolicy)) {
if(v_primitiveContentRetrieveResource.accessControlPolicy.selfPrivileges != v_privileges_1){
setverdict(fail, __SCOPE__ & ": Error: Self Privileges attribute not updated correctly")
}
}
}
}
......@@ -9147,6 +9261,7 @@ module OneM2M_Testcases {
var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.subscription.expirationTime := v_expirationTime;
......@@ -9160,6 +9275,13 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.subscription)) {
if(v_primitiveContentRetrieveResource.subscription.expirationTime != v_expirationTime){
setverdict(fail, __SCOPE__ & ": Error: Expiration time attribute not updated correctly")
}
}
}
}
......@@ -9167,6 +9289,7 @@ module OneM2M_Testcases {
var ListOfURIs v_notificationURI := {"NotReachableNotificationURI"};
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.subscription.notificationURI := v_notificationURI;
......@@ -9180,6 +9303,13 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.subscription)) {
if(v_primitiveContentRetrieveResource.subscription.notificationURI != v_notificationURI){
setverdict(fail, __SCOPE__ & ": Error: Notification URI attribute not updated correctly")
}
}
}
}
......@@ -9187,6 +9317,7 @@ module OneM2M_Testcases {
var NotificationContentType v_notificationContentType := int2;
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.subscription.notificationContentType := v_notificationContentType;
......@@ -9200,6 +9331,13 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.subscription)) {
if(v_primitiveContentRetrieveResource.subscription.notificationContentType != v_notificationContentType){
setverdict(fail, __SCOPE__ & ": Error: Notification Content Type attribute not updated correctly")
}
}
}
}
......@@ -9207,6 +9345,7 @@ module OneM2M_Testcases {
var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.group_.expirationTime := v_expirationTime;
......@@ -9220,6 +9359,13 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.group_)) {
if(v_primitiveContentRetrieveResource.group_.expirationTime != v_expirationTime){
setverdict(fail, __SCOPE__ & ": Error: Expiration Time attribute not updated correctly")
}
}
}
}
......@@ -9227,6 +9373,7 @@ module OneM2M_Testcases {
var XSD.PositiveInteger v_maxNrOfMembers := 10;
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.group_.maxNrOfMembers := v_maxNrOfMembers;
......@@ -9240,6 +9387,13 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.group_)) {
if(v_primitiveContentRetrieveResource.group_.maxNrOfMembers != v_maxNrOfMembers){
setverdict(fail, __SCOPE__ & ": Error: Maximum Number of Members attribute not updated correctly")
}
}
}
}
......@@ -9247,6 +9401,7 @@ module OneM2M_Testcases {
var ListOfURIs v_memberIDs := {"NotInitialized"};
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.group_.memberIDs := v_memberIDs;
......@@ -9260,10 +9415,17 @@ module OneM2M_Testcases {
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.group_)) {
if(v_primitiveContentRetrieveResource.group_.memberIDs != v_memberIDs){
setverdict(fail, __SCOPE__ & ": Error: Member IDs attribute not updated correctly")
}
}
}
}
function f_CSE_DMR_UPD_018(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on CseTester return ResponsePrimitive {
function f_CSE_DMR_UPD_018(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;
var RequestPrimitive v_request;
......@@ -9315,6 +9477,8 @@ module OneM2M_Testcases {
}
}
p_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex);
//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