Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
ATS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TST
ATS
Commits
7987f21f
Commit
7987f21f
authored
7 years ago
by
Pramod Kulkarni
Browse files
Options
Downloads
Patches
Plain Diff
Completed DMR/UPD/017 and its variants
parent
b883836f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!25
Ae fixes
,
!22
Stf531 dmr testcases
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
OneM2M_Testcases.ttcn
+751
-13
751 additions, 13 deletions
OneM2M_Testcases.ttcn
with
751 additions
and
13 deletions
OneM2M_Testcases.ttcn
+
751
−
13
View file @
7987f21f
...
...
@@ -8786,7 +8786,6 @@ module OneM2M_Testcases {
testcase TC_CSE_DMR_UPD_017_NOD_LBL() runs on CseTester system CseSystem {
var Labels v_labels := {"MyLabel"};
const AttributeAux c_optionalAttribute := {"labels", omit};
var template RequestPrimitive v_updateRequest := m_updateNodeBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
...
...
@@ -8814,81 +8813,830 @@ module OneM2M_Testcases {
}
testcase TC_CSE_DMR_UPD_017_NOD_ACPI() runs on CseTester system CseSystem {
var AcpType v_acpType := {"NotInitialized"};
var template RequestPrimitive v_updateRequest := m_updateNodeBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.node.accessControlPolicyIDs := v_acpType;
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.accessControlPolicyIDs != v_acpType){
setverdict(fail, testcasename() & ": Error: Access Control Policy attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.node)) {
if(v_primitiveContentRetrieveResource.node.accessControlPolicyIDs != v_acpType){
setverdict(fail, __SCOPE__ & ": Error: Access Control Policy attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_NOD_HCL() runs on CseTester system CseSystem {
/* TO BE DONE */
}
testcase TC_CSE_DMR_UPD_017_AE_LBL() runs on CseTester system CseSystem {
var Labels v_labels := {"MyLabel"};
var template RequestPrimitive v_updateRequest := m_updateAE;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.aE.labels := v_labels;
v_responsePrimitive := f_CSE_DMR_UPD_017(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.labels != v_labels){
setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.aE)) {
if(v_primitiveContentRetrieveResource.aE.labels != v_labels){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_AE_ACPI() runs on CseTester system CseSystem {
var AcpType v_acpType := {"NotInitialized"};
var template RequestPrimitive v_updateRequest := m_updateAE;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.aE.accessControlPolicyIDs := v_acpType;
v_responsePrimitive := f_CSE_DMR_UPD_017(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.accessControlPolicyIDs != v_acpType){
setverdict(fail, testcasename() & ": Error: Access control policy IDs attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.aE)) {
if(v_primitiveContentRetrieveResource.aE.accessControlPolicyIDs != v_acpType){
setverdict(fail, __SCOPE__ & ": Error: Access control policy IDs attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_AE_APN() runs on CseTester system CseSystem {
var XSD.String v_appName := "MyAppName";
var template RequestPrimitive v_updateRequest := m_updateAE;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.aE.appName := v_appName;
v_responsePrimitive := f_CSE_DMR_UPD_017(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.appName != v_appName){
setverdict(fail, testcasename() & ": Error: AppName attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.aE)) {
if(v_primitiveContentRetrieveResource.aE.appName != v_appName){
setverdict(fail, __SCOPE__ & ": Error: AppName attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_AE_POA() runs on CseTester system CseSystem {
var PoaList v_poaList := {"http://" & PX_AE2_ADDRESS & "/"};
var template RequestPrimitive v_updateRequest := m_updateAE;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.aE.pointOfAccess := v_poaList;
v_responsePrimitive := f_CSE_DMR_UPD_017(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.pointOfAccess != v_poaList){
setverdict(fail, testcasename() & ": Error: Point of Access attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.aE)) {
if(v_primitiveContentRetrieveResource.aE.pointOfAccess != v_poaList){
setverdict(fail, __SCOPE__ & ": Error: Point of Access attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_AE_OR() runs on CseTester system CseSystem {
var XSD.AnyURI v_ontoLogyRef := "MyOntologyRef";
var template RequestPrimitive v_updateRequest := m_updateAE;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.aE.ontologyRef := v_ontoLogyRef;
v_responsePrimitive := f_CSE_DMR_UPD_017(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.ontologyRef != v_ontoLogyRef){
setverdict(fail, testcasename() & ": Error: Ontology Ref attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.aE)) {
if(v_primitiveContentRetrieveResource.aE.ontologyRef != v_ontoLogyRef){
setverdict(fail, __SCOPE__ & ": Error: Ontology Ref attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_CNT_LBL() runs on CseTester system CseSystem {
var Labels v_labels := {"MyLabel"};
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.container.labels := v_labels;
v_responsePrimitive := f_CSE_DMR_UPD_017(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.labels != v_labels){
setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.container)) {
if(v_primitiveContentRetrieveResource.container.labels != v_labels){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_CNT_ACPI() runs on CseTester system CseSystem {
var AcpType v_acpType := {"NotInitialized"};
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.container.accessControlPolicyIDs := v_acpType;
v_responsePrimitive := f_CSE_DMR_UPD_017(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.accessControlPolicyIDs != v_acpType){
setverdict(fail, testcasename() & ": Error: Access Control Policy IDs attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.container)) {
if(v_primitiveContentRetrieveResource.container.accessControlPolicyIDs != v_acpType){
setverdict(fail, __SCOPE__ & ": Error: Access Control Policy IDs attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_CNT_MNI() runs on CseTester system CseSystem {
var XSD.NonNegativeInteger v_maxNrOfInstances := 5;
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.container.maxNrOfInstances := v_maxNrOfInstances;
v_responsePrimitive := f_CSE_DMR_UPD_017(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.maxNrOfInstances != v_maxNrOfInstances){
setverdict(fail, testcasename() & ": Error: Maximum number of instances attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.container)) {
if(v_primitiveContentRetrieveResource.container.maxNrOfInstances != v_maxNrOfInstances){
setverdict(fail, __SCOPE__ & ": Error: Maximum number of instances attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_CNT_MBS() runs on CseTester system CseSystem {
var XSD.NonNegativeInteger v_maxByteSize := 512;
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.container.maxByteSize := v_maxByteSize;
v_responsePrimitive := f_CSE_DMR_UPD_017(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.maxByteSize != v_maxByteSize){
setverdict(fail, testcasename() & ": Error: Maximum Byte size attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.container)) {
if(v_primitiveContentRetrieveResource.container.maxByteSize != v_maxByteSize){
setverdict(fail, __SCOPE__ & ": Error: Maximum Byte Size attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_CNT_MIA() runs on CseTester system CseSystem {
var XSD.NonNegativeInteger v_maxInstanceAge := 1;
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.container.maxInstanceAge := v_maxInstanceAge;
v_responsePrimitive := f_CSE_DMR_UPD_017(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.maxInstanceAge != v_maxInstanceAge){
setverdict(fail, testcasename() & ": Error: Maximum Instance age attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.container)) {
if(v_primitiveContentRetrieveResource.container.maxInstanceAge != v_maxInstanceAge){
setverdict(fail, __SCOPE__ & ": Error: Maximum Instance age attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_CNT_OR() runs on CseTester system CseSystem {
var XSD.AnyURI v_ontoLogyRef := "MyOntologyRef";
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.container.ontologyRef := v_ontoLogyRef;
v_responsePrimitive := f_CSE_DMR_UPD_017(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.ontologyRef != v_ontoLogyRef){
setverdict(fail, testcasename() & ": Error: Ontology Ref attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.container)) {
if(v_primitiveContentRetrieveResource.container.ontologyRef != v_ontoLogyRef){
setverdict(fail, __SCOPE__ & ": Error: Ontology Ref attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_CNT_LI() runs on CseTester system CseSystem {
var XSD.AnyURI v_locationID := "MyLocationID";
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.container.locationID := v_locationID;
v_responsePrimitive := f_CSE_DMR_UPD_017(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.locationID != v_locationID){
setverdict(fail, testcasename() & ": Error: Location ID attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.container)) {
if(v_primitiveContentRetrieveResource.container.locationID != v_locationID){
setverdict(fail, __SCOPE__ & ": Error: Location ID attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_ACP_LBL() runs on CseTester system CseSystem {
var Labels v_labels := {"MyLabel"};
var template RequestPrimitive v_updateRequest := m_updateAcpBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.accessControlPolicy.labels := v_labels;
v_responsePrimitive := f_CSE_DMR_UPD_017(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.labels != v_labels){
setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.accessControlPolicy)) {
if(v_primitiveContentRetrieveResource.accessControlPolicy.labels != v_labels){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_SUB_ACPI() runs on CseTester system CseSystem {
var AcpType v_acpType := {"NotInitialized"};
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.subscription.accessControlPolicyIDs := v_acpType;
v_responsePrimitive := f_CSE_DMR_UPD_017(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.accessControlPolicyIDs != v_acpType){
setverdict(fail, testcasename() & ": Error: Access Control Policy IDs attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.subscription)) {
if(v_primitiveContentRetrieveResource.subscription.accessControlPolicyIDs != v_acpType){
setverdict(fail, __SCOPE__ & ": Error: Access Control Policy IDs attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_SUB_LBL() runs on CseTester system CseSystem {
var Labels v_labels := {"MyLabel"};
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.subscription.labels := v_labels;
v_responsePrimitive := f_CSE_DMR_UPD_017(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.labels != v_labels){
setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.subscription)) {
if(v_primitiveContentRetrieveResource.subscription.labels != v_labels){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_SUB_ENC() runs on CseTester system CseSystem {
var EventNotificationCriteria v_eventNotificationCriteria:= valueof(m_eventNotificationCriteria({int3}, -));
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.subscription.eventNotificationCriteria:=v_eventNotificationCriteria ;
v_responsePrimitive := f_CSE_DMR_UPD_017(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.eventNotificationCriteria != v_eventNotificationCriteria){
setverdict(fail, testcasename() & ": Error: Event Notification Criteria attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.subscription)) {
if(v_primitiveContentRetrieveResource.subscription.eventNotificationCriteria != v_eventNotificationCriteria){
setverdict(fail, __SCOPE__ & ": Error: Event Notofication Criteria attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_SUB_EXC() runs on CseTester system CseSystem {
var XSD.PositiveInteger v_expirationCounter:=10;
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.subscription.expirationCounter:=v_expirationCounter;
v_responsePrimitive := f_CSE_DMR_UPD_017(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.expirationCounter != v_expirationCounter){
setverdict(fail, testcasename() & ": Error: Expiration Counter attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.subscription)) {
if(v_primitiveContentRetrieveResource.subscription.expirationCounter != v_expirationCounter){
setverdict(fail, __SCOPE__ & ": Error: Expiration Counter attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_SUB_GPI() runs on CseTester system CseSystem {
var XSD.AnyURI v_groupID := "MyGroupID";
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.subscription.groupID:=v_groupID;
v_responsePrimitive := f_CSE_DMR_UPD_017(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.groupID != v_groupID){
setverdict(fail, testcasename() & ": Error: Group ID attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.subscription)) {
if(v_primitiveContentRetrieveResource.subscription.groupID != v_groupID){
setverdict(fail, __SCOPE__ & ": Error: Group ID attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_SUB_NFU() runs on CseTester system CseSystem {
var XSD.AnyURI v_notificationForwardingURI:= "MyNotificationForwardingURI";
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.subscription.notificationForwardingURI:=v_notificationForwardingURI;
v_responsePrimitive := f_CSE_DMR_UPD_017(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.notificationForwardingURI != v_notificationForwardingURI){
setverdict(fail, testcasename() & ": Error: Notification Forwarding URI attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.subscription)) {
if(v_primitiveContentRetrieveResource.subscription.notificationForwardingURI != v_notificationForwardingURI){
setverdict(fail, __SCOPE__ & ": Error: Notification Forwarding URI attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_SUB_BN() runs on CseTester system CseSystem {
var BatchNotify v_batchNotify:= {1, "PT1S"};
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.subscription.batchNotify:=v_batchNotify;
v_responsePrimitive := f_CSE_DMR_UPD_017(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.batchNotify != v_batchNotify){
setverdict(fail, testcasename() & ": Error: Batch Notify attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.subscription)) {
if(v_primitiveContentRetrieveResource.subscription.batchNotify != v_batchNotify){
setverdict(fail, __SCOPE__ & ": Error: Batch Notify attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_SUB_RL() runs on CseTester system CseSystem {
var RateLimit v_rateLimit:= {2, "PT1S"};
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.subscription.rateLimit:=v_rateLimit;
v_responsePrimitive := f_CSE_DMR_UPD_017(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.rateLimit != v_rateLimit){
setverdict(fail, testcasename() & ": Error: Rate Limit attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.subscription)) {
if(v_primitiveContentRetrieveResource.subscription.rateLimit != v_rateLimit){
setverdict(fail, __SCOPE__ & ": Error: Rate Limit attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_SUB_PN() runs on CseTester system CseSystem {
var PendingNotification v_pendingNotification:=int2;
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.subscription.pendingNotification:=v_pendingNotification;
v_responsePrimitive := f_CSE_DMR_UPD_017(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.pendingNotification != v_pendingNotification){
setverdict(fail, testcasename() & ": Error: Pending Notification attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.subscription)) {
if(v_primitiveContentRetrieveResource.subscription.pendingNotification != v_pendingNotification){
setverdict(fail, __SCOPE__ & ": Error: Pending Notification attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_SUB_NSP() runs on CseTester system CseSystem {
var XSD.PositiveInteger v_notificationStoragePriority:=10;
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.subscription.notificationStoragePriority:=v_notificationStoragePriority;
v_responsePrimitive := f_CSE_DMR_UPD_017(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.notificationStoragePriority != v_notificationStoragePriority){
setverdict(fail, testcasename() & ": Error: Notification Storage priority attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.subscription)) {
if(v_primitiveContentRetrieveResource.subscription.notificationStoragePriority != v_notificationStoragePriority){
setverdict(fail, __SCOPE__ & ": Error: Notification Storage priority attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_SUB_LN() runs on CseTester system CseSystem {
var XSD.Boolean v_latestNotify:=true;
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.subscription.latestNotify:=v_latestNotify;
v_responsePrimitive := f_CSE_DMR_UPD_017(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.latestNotify != v_latestNotify){
setverdict(fail, testcasename() & ": Error: Latest Notify priority attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.subscription)) {
if(v_primitiveContentRetrieveResource.subscription.latestNotify != v_latestNotify){
setverdict(fail, __SCOPE__ & ": Error: Latest Notify attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_SUB_NEC() runs on CseTester system CseSystem {
var EventCat v_eventCat:= {alt_1:= 300};
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.subscription.notificationEventCat:=v_eventCat;
v_responsePrimitive := f_CSE_DMR_UPD_017(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.notificationEventCat != v_eventCat){
setverdict(fail, testcasename() & ": Error: Notification Event Cat attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.subscription)) {
if(v_primitiveContentRetrieveResource.subscription.notificationEventCat != v_eventCat){
setverdict(fail, __SCOPE__ & ": Error: Notification Event Cat attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_GRP_LBL() runs on CseTester system CseSystem {
var Labels v_labels := {"MyLabel"};
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.group_.labels := v_labels;
v_responsePrimitive := f_CSE_DMR_UPD_017(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_.labels != v_labels){
setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.group_)) {
if(v_primitiveContentRetrieveResource.group_.labels != v_labels){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_GRP_ACPI() runs on CseTester system CseSystem {
var AcpType v_acpType := {"NotInitialized"};
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.group_.accessControlPolicyIDs := v_acpType;
v_responsePrimitive := f_CSE_DMR_UPD_017(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_.accessControlPolicyIDs != v_acpType){
setverdict(fail, testcasename() & ": Error: Access Control Policy IDs attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.group_)) {
if(v_primitiveContentRetrieveResource.group_.accessControlPolicyIDs != v_acpType){
setverdict(fail, __SCOPE__ & ": Error: Access Control Policy IDs attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_GRP_MACP() runs on CseTester system CseSystem {
var ListOfURIs v_membersAccessControlPolicyIDs := {"NotInitialized"};
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.group_.membersAccessControlPolicyIDs := v_membersAccessControlPolicyIDs;
v_responsePrimitive := f_CSE_DMR_UPD_017(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_.membersAccessControlPolicyIDs != v_membersAccessControlPolicyIDs){
setverdict(fail, testcasename() & ": Error: Members Access Control Policy IDs attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.group_)) {
if(v_primitiveContentRetrieveResource.group_.membersAccessControlPolicyIDs != v_membersAccessControlPolicyIDs){
setverdict(fail, __SCOPE__ & ": Error: Members Access Control Policy IDs attribute not updated correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_017_GRP_GN() runs on CseTester system CseSystem {
var XSD.String v_groupName:="MyGroupName";
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.group_.groupName := v_groupName;
v_responsePrimitive := f_CSE_DMR_UPD_017(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_.groupName != v_groupName){
setverdict(fail, testcasename() & ": Error: Group name attribute not updated correctly")
}
}
}
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.group_)) {
if(v_primitiveContentRetrieveResource.group_.groupName != v_groupName){
setverdict(fail, __SCOPE__ & ": Error: Group name attribute not updated correctly")
}
}
}
}
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 {
...
...
@@ -8922,12 +9670,7 @@ module OneM2M_Testcases {
//Test Body
v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive);
if(p_resourceType!=int16) {
mcaPort.send(m_request(v_request)); //CSEBase
} else {
mccPort.send(m_request(v_request)); //RemoteCSE
}
mcaPort.send(m_request(v_request)); //CSEBase
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response {
...
...
@@ -9456,12 +10199,7 @@ module OneM2M_Testcases {
//Test Body
v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive);
if(p_resourceType!=int16){
mcaPort.send(m_request(v_request)); //CSEBase
} else {
mccPort.send(m_request(v_request)); //RemoteCSE
}
mcaPort.send(m_request(v_request)); //CSEBase
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response {
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment