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

Further TTCN changes for DMR/UPD/018 and DMR/UPD/017 testcases and its variants

parent 37480ea7
No related branches found
No related tags found
2 merge requests!25Ae fixes,!22Stf531 dmr testcases
...@@ -8703,38 +8703,82 @@ module OneM2M_Testcases { ...@@ -8703,38 +8703,82 @@ module OneM2M_Testcases {
testcase TC_CSE_DMR_UPD_017_CSR_LBL() runs on CseTester system CseSystem { testcase TC_CSE_DMR_UPD_017_CSR_LBL() runs on CseTester system CseSystem {
var Labels v_labels := {"MyLabel"}; var Labels v_labels := {"MyLabel"};
var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase; var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;
var ResponsePrimitive v_responsePrimitive;
v_updateRequest.primitiveContent.remoteCSE.labels := v_labels; v_updateRequest.primitiveContent.remoteCSE.labels := v_labels;
f_CSE_DMR_UPD_017(int16, m_createRemoteCSEBase, v_updateRequest);//Remote CSE v_responsePrimitive := f_CSE_DMR_UPD_017(int16, m_createRemoteCSEBase, v_updateRequest);//Remote CSE
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.remoteCSE)) {
if(v_responsePrimitive.primitiveContent.remoteCSE.labels != v_labels){
setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
}
}
}
}
} }
testcase TC_CSE_DMR_UPD_017_CSR_POA() runs on CseTester system CseSystem { testcase TC_CSE_DMR_UPD_017_CSR_POA() runs on CseTester system CseSystem {
var PoaList v_poaList := {"http://" & PX_AE2_ADDRESS & "/"}; var PoaList v_poaList := {"http://" & PX_AE2_ADDRESS & "/"};
var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase; var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;
var ResponsePrimitive v_responsePrimitive;
v_updateRequest.primitiveContent.remoteCSE.pointOfAccess := v_poaList; v_updateRequest.primitiveContent.remoteCSE.pointOfAccess := v_poaList;
f_CSE_DMR_UPD_017(int16, m_createRemoteCSEBase, v_updateRequest);//Remote CSE v_responsePrimitive := f_CSE_DMR_UPD_017(int16, m_createRemoteCSEBase, v_updateRequest);//Remote CSE
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.remoteCSE)) {
if(v_responsePrimitive.primitiveContent.remoteCSE.pointOfAccess != v_poaList){
setverdict(fail, testcasename() & ": Error: Point of access attribute not updated correctly")
}
}
}
}
} }
testcase TC_CSE_DMR_UPD_017_CSR_NL() runs on CseTester system CseSystem { testcase TC_CSE_DMR_UPD_017_CSR_NL() runs on CseTester system CseSystem {
var XSD.AnyURI v_nodeLink := "MyNodeId"; var XSD.AnyURI v_nodeLink := "MyNodeId";
var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase; var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;
var ResponsePrimitive v_responsePrimitive;
v_updateRequest.primitiveContent.remoteCSE.nodeLink := v_nodeLink; v_updateRequest.primitiveContent.remoteCSE.nodeLink := v_nodeLink;
f_CSE_DMR_UPD_017(int16, m_createRemoteCSEBase, v_updateRequest);//Remote CSE v_responsePrimitive := f_CSE_DMR_UPD_017(int16, m_createRemoteCSEBase, v_updateRequest);//Remote CSE
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.remoteCSE)) {
if(v_responsePrimitive.primitiveContent.remoteCSE.nodeLink != v_nodeLink){
setverdict(fail, testcasename() & ": Error: Node link attribute not updated correctly")
}
}
}
}
} }
testcase TC_CSE_DMR_UPD_017_NOD_LBL() runs on CseTester system CseSystem { testcase TC_CSE_DMR_UPD_017_NOD_LBL() runs on CseTester system CseSystem {
var Labels v_labels := {"MyLabel"}; var Labels v_labels := {"MyLabel"};
const AttributeAux c_optionalAttribute := {"labels", omit}; const AttributeAux c_optionalAttribute := {"labels", omit};
var template RequestPrimitive v_updateRequest := m_updateNodeBase; var template RequestPrimitive v_updateRequest := m_updateNodeBase;
var ResponsePrimitive v_responsePrimitive;
v_updateRequest.primitiveContent.node.labels := v_labels; v_updateRequest.primitiveContent.node.labels := v_labels;
f_CSE_DMR_UPD_017(int9, m_createNodeBase, v_updateRequest);//Node v_responsePrimitive := f_CSE_DMR_UPD_017(int9, m_createNodeBase, v_updateRequest);//Node
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.node)) {
if(v_responsePrimitive.primitiveContent.node.labels != v_labels){
setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
}
}
}
}
} }
testcase TC_CSE_DMR_UPD_017_NOD_ACPI() runs on CseTester system CseSystem { testcase TC_CSE_DMR_UPD_017_NOD_ACPI() runs on CseTester system CseSystem {
...@@ -8815,7 +8859,7 @@ module OneM2M_Testcases { ...@@ -8815,7 +8859,7 @@ module OneM2M_Testcases {
testcase TC_CSE_DMR_UPD_017_SUB_LN() runs on CseTester system CseSystem { 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 { function f_CSE_DMR_UPD_017(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on CseTester return ResponsePrimitive {
//Local variables //Local variables
var MsgIn v_response; var MsgIn v_response;
var RequestPrimitive v_request; var RequestPrimitive v_request;
...@@ -8872,6 +8916,8 @@ module OneM2M_Testcases { ...@@ -8872,6 +8916,8 @@ module OneM2M_Testcases {
// Tear down // Tear down
f_cf02Down(); f_cf02Down();
return v_response.primitive.responsePrimitive;
} // end function f_CSE_DMR_UPD_017 } // end function f_CSE_DMR_UPD_017
} // end group g_CSE_DMR_UPD_017 } // end group g_CSE_DMR_UPD_017
...@@ -8881,73 +8927,162 @@ module OneM2M_Testcases { ...@@ -8881,73 +8927,162 @@ module OneM2M_Testcases {
testcase TC_CSE_DMR_UPD_018_CSR_ET() runs on CseTester system CseSystem { testcase TC_CSE_DMR_UPD_018_CSR_ET() runs on CseTester system CseSystem {
var Timestamp v_expirationTime := "20001231T012345"; var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase; var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;
var ResponsePrimitive v_responsePrimitive;
v_updateRequest.primitiveContent.remoteCSE.expirationTime := v_expirationTime; v_updateRequest.primitiveContent.remoteCSE.expirationTime := v_expirationTime;
f_CSE_DMR_UPD_018(int16, m_createRemoteCSEBase, v_updateRequest);//Remote CSE v_responsePrimitive := f_CSE_DMR_UPD_018(int16, m_createRemoteCSEBase, v_updateRequest);//Remote CSE
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.remoteCSE)) {
if(v_responsePrimitive.primitiveContent.remoteCSE.expirationTime != v_expirationTime){
setverdict(fail, testcasename() & ": Error: Expiration time attribute not updated correctly")
}
}
}
}
} }
testcase TC_CSE_DMR_UPD_018_CSR_RR() runs on CseTester system CseSystem { testcase TC_CSE_DMR_UPD_018_CSR_RR() runs on CseTester system CseSystem {
var XSD.Boolean v_requestReachability := true; var XSD.Boolean v_requestReachability := true;
var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase; var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;
var ResponsePrimitive v_responsePrimitive;
v_updateRequest.primitiveContent.remoteCSE.requestReachability := v_requestReachability; v_updateRequest.primitiveContent.remoteCSE.requestReachability := v_requestReachability;
f_CSE_DMR_UPD_018(int16, m_createRemoteCSEBase, v_updateRequest);//Remote CSE v_responsePrimitive := f_CSE_DMR_UPD_018(int16, m_createRemoteCSEBase, v_updateRequest);//Remote CSE
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.remoteCSE)) {
if(v_responsePrimitive.primitiveContent.remoteCSE.requestReachability != v_requestReachability){
setverdict(fail, testcasename() & ": Error: Request Reachability attribute not updated correctly")
}
}
}
}
} }
testcase TC_CSE_DMR_UPD_018_NOD_ET() runs on CseTester system CseSystem { testcase TC_CSE_DMR_UPD_018_NOD_ET() runs on CseTester system CseSystem {
var Timestamp v_expirationTime := "20001231T012345"; var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateNodeBase; var template RequestPrimitive v_updateRequest := m_updateNodeBase;
var ResponsePrimitive v_responsePrimitive;
v_updateRequest.primitiveContent.node.expirationTime := v_expirationTime; v_updateRequest.primitiveContent.node.expirationTime := v_expirationTime;
f_CSE_DMR_UPD_018(int9, m_createNodeBase, v_updateRequest);//Node v_responsePrimitive := f_CSE_DMR_UPD_018(int9, m_createNodeBase, v_updateRequest);//Node
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.node)) {
if(v_responsePrimitive.primitiveContent.node.expirationTime != v_expirationTime){
setverdict(fail, testcasename() & ": Error: Expiration time attribute not updated correctly")
}
}
}
}
} }
testcase TC_CSE_DMR_UPD_018_NOD_NI() runs on CseTester system CseSystem { testcase TC_CSE_DMR_UPD_018_NOD_NI() runs on CseTester system CseSystem {
var template RequestPrimitive v_updateRequest := m_updateNodeBase; var template RequestPrimitive v_updateRequest := m_updateNodeBase;
var XSD.Token v_targetId := "TARGET-ID"; var XSD.Token v_targetId := "TARGET-ID";
var ResponsePrimitive v_responsePrimitive;
v_updateRequest.primitiveContent.node.nodeID := v_targetId; v_updateRequest.primitiveContent.node.nodeID := v_targetId;
f_CSE_DMR_UPD_018(int9, m_createNodeBase, v_updateRequest);//Node v_responsePrimitive := f_CSE_DMR_UPD_018(int9, m_createNodeBase, v_updateRequest);//Node
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.node)) {
if(v_responsePrimitive.primitiveContent.node.nodeID != v_targetId){
setverdict(fail, testcasename() & ": Error: NodeID attribute not updated correctly")
}
}
}
}
} }
testcase TC_CSE_DMR_UPD_018_AE_ET() runs on CseTester system CseSystem { testcase TC_CSE_DMR_UPD_018_AE_ET() runs on CseTester system CseSystem {
var Timestamp v_expirationTime := "20001231T012345"; var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateAE; var template RequestPrimitive v_updateRequest := m_updateAE;
var ResponsePrimitive v_responsePrimitive;
v_updateRequest.primitiveContent.aE.expirationTime := v_expirationTime; v_updateRequest.primitiveContent.aE.expirationTime := v_expirationTime;
f_CSE_DMR_UPD_018(int2, m_createAe(PX_APP_ID), v_updateRequest);//AE v_responsePrimitive := f_CSE_DMR_UPD_018(int2, m_createAe(PX_APP_ID), v_updateRequest);//AE
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.aE)) {
if(v_responsePrimitive.primitiveContent.aE.expirationTime != v_expirationTime){
setverdict(fail, testcasename() & ": Error: Expiration time attribute not updated correctly")
}
}
}
}
} }
testcase TC_CSE_DMR_UPD_018_AE_RR() runs on CseTester system CseSystem { testcase TC_CSE_DMR_UPD_018_AE_RR() runs on CseTester system CseSystem {
var XSD.Boolean v_requestReachability := true; var XSD.Boolean v_requestReachability := true;
var template RequestPrimitive v_updateRequest := m_updateAE; var template RequestPrimitive v_updateRequest := m_updateAE;
var ResponsePrimitive v_responsePrimitive;
v_updateRequest.primitiveContent.aE.requestReachability := v_requestReachability; v_updateRequest.primitiveContent.aE.requestReachability := v_requestReachability;
f_CSE_DMR_UPD_018(int2, m_createAe(PX_APP_ID), v_updateRequest);//AE v_responsePrimitive := f_CSE_DMR_UPD_018(int2, m_createAe(PX_APP_ID), v_updateRequest);//AE
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.aE)) {
if(v_responsePrimitive.primitiveContent.aE.requestReachability != v_requestReachability){
setverdict(fail, testcasename() & ": Error: Request Reachability attribute not updated correctly")
}
}
}
}
} }
testcase TC_CSE_DMR_UPD_018_CNT_ET() runs on CseTester system CseSystem { testcase TC_CSE_DMR_UPD_018_CNT_ET() runs on CseTester system CseSystem {
var Timestamp v_expirationTime := "20001231T012345"; var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateContainerBase; var template RequestPrimitive v_updateRequest := m_updateContainerBase;
var ResponsePrimitive v_responsePrimitive;
v_updateRequest.primitiveContent.container.expirationTime := v_expirationTime; v_updateRequest.primitiveContent.container.expirationTime := v_expirationTime;
f_CSE_DMR_UPD_018(int3, m_createContainerBase, v_updateRequest);//Container v_responsePrimitive := f_CSE_DMR_UPD_018(int3, m_createContainerBase, v_updateRequest);//Container
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.container)) {
if(v_responsePrimitive.primitiveContent.container.expirationTime != v_expirationTime){
setverdict(fail, testcasename() & ": Error: Expiration time attribute not updated correctly")
}
}
}
}
} }
testcase TC_CSE_DMR_UPD_018_ACP_ET() runs on CseTester system CseSystem { testcase TC_CSE_DMR_UPD_018_ACP_ET() runs on CseTester system CseSystem {
var Timestamp v_expirationTime := "20001231T012345"; var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateAcpBase; var template RequestPrimitive v_updateRequest := m_updateAcpBase;
var ResponsePrimitive v_responsePrimitive;
v_updateRequest.primitiveContent.accessControlPolicy.expirationTime := v_expirationTime; v_updateRequest.primitiveContent.accessControlPolicy.expirationTime := v_expirationTime;
f_CSE_DMR_UPD_018(int1, m_createAcpBase, v_updateRequest);//AccessControlPolicy v_responsePrimitive := f_CSE_DMR_UPD_018(int1, m_createAcpBase, v_updateRequest);//AccessControlPolicy
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.accessControlPolicy)) {
if(v_responsePrimitive.primitiveContent.accessControlPolicy.expirationTime != v_expirationTime){
setverdict(fail, testcasename() & ": Error: Expiration time attribute not updated correctly")
}
}
}
}
} }
testcase TC_CSE_DMR_UPD_018_ACP_PV() runs on CseTester system CseSystem { testcase TC_CSE_DMR_UPD_018_ACP_PV() runs on CseTester system CseSystem {
...@@ -8963,9 +9098,20 @@ module OneM2M_Testcases { ...@@ -8963,9 +9098,20 @@ module OneM2M_Testcases {
} }
} }
var template RequestPrimitive v_updateRequest := m_updateAcpBase; var template RequestPrimitive v_updateRequest := m_updateAcpBase;
var ResponsePrimitive v_responsePrimitive;
v_updateRequest.primitiveContent.accessControlPolicy.privileges := v_privileges_1; v_updateRequest.primitiveContent.accessControlPolicy.privileges := v_privileges_1;
f_CSE_DMR_UPD_018(int1, m_createAcpBase, v_updateRequest);//AccessControlPolicy v_responsePrimitive := f_CSE_DMR_UPD_018(int1, m_createAcpBase, v_updateRequest);//AccessControlPolicy
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.accessControlPolicy)) {
if(v_responsePrimitive.primitiveContent.accessControlPolicy.privileges != v_privileges_1){
setverdict(fail, testcasename() & ": Error: Privileges attribute not updated correctly")
}
}
}
}
} }
testcase TC_CSE_DMR_UPD_018_ACP_PVS() runs on CseTester system CseSystem { testcase TC_CSE_DMR_UPD_018_ACP_PVS() runs on CseTester system CseSystem {
...@@ -8981,66 +9127,143 @@ module OneM2M_Testcases { ...@@ -8981,66 +9127,143 @@ module OneM2M_Testcases {
} }
} }
var template RequestPrimitive v_updateRequest := m_updateAcpBase; var template RequestPrimitive v_updateRequest := m_updateAcpBase;
var ResponsePrimitive v_responsePrimitive;
v_updateRequest.primitiveContent.accessControlPolicy.selfPrivileges := v_privileges_1; v_updateRequest.primitiveContent.accessControlPolicy.selfPrivileges := v_privileges_1;
f_CSE_DMR_UPD_018(int1, m_createAcpBase, v_updateRequest);//AccessControlPolicy v_responsePrimitive := f_CSE_DMR_UPD_018(int1, m_createAcpBase, v_updateRequest);//AccessControlPolicy
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.accessControlPolicy)) {
if(v_responsePrimitive.primitiveContent.accessControlPolicy.selfPrivileges != v_privileges_1){
setverdict(fail, testcasename() & ": Error: Self Privileges attribute not updated correctly")
}
}
}
}
} }
testcase TC_CSE_DMR_UPD_018_SUB_ET() runs on CseTester system CseSystem { testcase TC_CSE_DMR_UPD_018_SUB_ET() runs on CseTester system CseSystem {
var Timestamp v_expirationTime := "20001231T012345"; var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
v_updateRequest.primitiveContent.subscription.expirationTime := v_expirationTime; v_updateRequest.primitiveContent.subscription.expirationTime := v_expirationTime;
f_CSE_DMR_UPD_018(int23, m_createSubscriptionBase, v_updateRequest);//Subscription v_responsePrimitive := f_CSE_DMR_UPD_018(int23, m_createSubscriptionBase, v_updateRequest);//Subscription
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.subscription)) {
if(v_responsePrimitive.primitiveContent.subscription.expirationTime != v_expirationTime){
setverdict(fail, testcasename() & ": Error: Expiration time attribute not updated correctly")
}
}
}
}
} }
testcase TC_CSE_DMR_UPD_018_SUB_NU() runs on CseTester system CseSystem { testcase TC_CSE_DMR_UPD_018_SUB_NU() runs on CseTester system CseSystem {
var ListOfURIs v_notificationURI := {"NotReachableNotificationURI"}; var ListOfURIs v_notificationURI := {"NotReachableNotificationURI"};
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
v_updateRequest.primitiveContent.subscription.notificationURI := v_notificationURI; v_updateRequest.primitiveContent.subscription.notificationURI := v_notificationURI;
f_CSE_DMR_UPD_018(int23, m_createSubscriptionBase, v_updateRequest);//Subscription v_responsePrimitive := f_CSE_DMR_UPD_018(int23, m_createSubscriptionBase, v_updateRequest);//Subscription
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.subscription)) {
if(v_responsePrimitive.primitiveContent.subscription.notificationURI != v_notificationURI){
setverdict(fail, testcasename() & ": Error: Notification URI attribute not updated correctly")
}
}
}
}
} }
testcase TC_CSE_DMR_UPD_018_SUB_NCT() runs on CseTester system CseSystem { testcase TC_CSE_DMR_UPD_018_SUB_NCT() runs on CseTester system CseSystem {
var NotificationContentType v_notificationContentType := int2; var NotificationContentType v_notificationContentType := int2;
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase; var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
v_updateRequest.primitiveContent.subscription.notificationContentType := v_notificationContentType; v_updateRequest.primitiveContent.subscription.notificationContentType := v_notificationContentType;
f_CSE_DMR_UPD_018(int23, m_createSubscriptionBase, v_updateRequest);//Subscription v_responsePrimitive := f_CSE_DMR_UPD_018(int23, m_createSubscriptionBase, v_updateRequest);//Subscription
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.subscription)) {
if(v_responsePrimitive.primitiveContent.subscription.notificationContentType != v_notificationContentType){
setverdict(fail, testcasename() & ": Error: Notification Content Type attribute not updated correctly")
}
}
}
}
} }
testcase TC_CSE_DMR_UPD_018_GRP_ET() runs on CseTester system CseSystem { testcase TC_CSE_DMR_UPD_018_GRP_ET() runs on CseTester system CseSystem {
var Timestamp v_expirationTime := "20001231T012345"; var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateGroupBase; var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var ResponsePrimitive v_responsePrimitive;
v_updateRequest.primitiveContent.group_.expirationTime := v_expirationTime; v_updateRequest.primitiveContent.group_.expirationTime := v_expirationTime;
f_CSE_DMR_UPD_018(int9, m_createGroupBase, v_updateRequest);//Group v_responsePrimitive := f_CSE_DMR_UPD_018(int9, m_createGroupBase, v_updateRequest);//Group
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.group_)) {
if(v_responsePrimitive.primitiveContent.group_.expirationTime != v_expirationTime){
setverdict(fail, testcasename() & ": Error: Expiration Time attribute not updated correctly")
}
}
}
}
} }
testcase TC_CSE_DMR_UPD_018_GRP_MNM() runs on CseTester system CseSystem { testcase TC_CSE_DMR_UPD_018_GRP_MNM() runs on CseTester system CseSystem {
var XSD.PositiveInteger v_maxNrOfMembers := 10; var XSD.PositiveInteger v_maxNrOfMembers := 10;
var template RequestPrimitive v_updateRequest := m_updateGroupBase; var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var ResponsePrimitive v_responsePrimitive;
v_updateRequest.primitiveContent.group_.maxNrOfMembers := v_maxNrOfMembers; v_updateRequest.primitiveContent.group_.maxNrOfMembers := v_maxNrOfMembers;
f_CSE_DMR_UPD_018(int9, m_createGroupBase, v_updateRequest);//Group v_responsePrimitive := f_CSE_DMR_UPD_018(int9, m_createGroupBase, v_updateRequest);//Group
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.group_)) {
if(v_responsePrimitive.primitiveContent.group_.maxNrOfMembers != v_maxNrOfMembers){
setverdict(fail, testcasename() & ": Error: Maximum Number of Members attribute not updated correctly")
}
}
}
}
} }
testcase TC_CSE_DMR_UPD_018_GRP_MID() runs on CseTester system CseSystem { testcase TC_CSE_DMR_UPD_018_GRP_MID() runs on CseTester system CseSystem {
var ListOfURIs v_memberIDs := {"NotInitialized"}; var ListOfURIs v_memberIDs := {"NotInitialized"};
var template RequestPrimitive v_updateRequest := m_updateGroupBase; var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var ResponsePrimitive v_responsePrimitive;
v_updateRequest.primitiveContent.group_.memberIDs := v_memberIDs; v_updateRequest.primitiveContent.group_.memberIDs := v_memberIDs;
f_CSE_DMR_UPD_018(int9, m_createGroupBase, v_updateRequest);//Group v_responsePrimitive := f_CSE_DMR_UPD_018(int9, m_createGroupBase, v_updateRequest);//Group
if(getverdict == pass){
//Check attribute 1
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.group_)) {
if(v_responsePrimitive.primitiveContent.group_.memberIDs != v_memberIDs){
setverdict(fail, testcasename() & ": 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 { function f_CSE_DMR_UPD_018(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on CseTester return ResponsePrimitive {
//Local variables //Local variables
var MsgIn v_response; var MsgIn v_response;
var RequestPrimitive v_request; var RequestPrimitive v_request;
...@@ -9096,7 +9319,9 @@ module OneM2M_Testcases { ...@@ -9096,7 +9319,9 @@ module OneM2M_Testcases {
f_cse_postamble_deleteResources(); f_cse_postamble_deleteResources();
// Tear down // Tear down
f_cf02Down(); f_cf02Down();
return v_response.primitive.responsePrimitive;
} //end function f_CSE_DMR_UPD_018 } //end function f_CSE_DMR_UPD_018
} // end group g_CSE_DMR_UPD_018 } // end group g_CSE_DMR_UPD_018
......
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