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

Corrections for checking notificationStatsInfo attribute

parent fb53e360
No related branches found
No related tags found
No related merge requests found
......@@ -3121,7 +3121,9 @@ module OneM2M_Testcases_CSE_Release_4 {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_retrieveContentResponse))) -> value vc_response {
tc_ac.stop;
if(ispresent(vc_response.primitive.responsePrimitive.primitiveContent.crossResourceSubscription.notificationStatsInfo)) {
if(sizeof(vc_response.primitive.responsePrimitive.primitiveContent.crossResourceSubscription.notificationStatsInfo) == 1 ){
if((vc_response.primitive.responsePrimitive.primitiveContent.crossResourceSubscription.notificationStatsInfo.notificationStats_list[0].requestsSent == 1 ) and
(vc_response.primitive.responsePrimitive.primitiveContent.crossResourceSubscription.notificationStatsInfo.notificationStats_list[0].responsesReceived == 1 ) and
(vc_response.primitive.responsePrimitive.primitiveContent.crossResourceSubscription.notificationStatsInfo.notificationStats_list[0].notificationEventCount == 1 )) {
setverdict(pass, __SCOPE__ & ": INFO: notifications recorded correctly");
}
else{
......@@ -3329,7 +3331,9 @@ module OneM2M_Testcases_CSE_Release_4 {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_retrieveContentResponse))) -> value vc_response {
tc_ac.stop;
if(ispresent(vc_response.primitive.responsePrimitive.primitiveContent.crossResourceSubscription.notificationStatsInfo)) {
if(sizeof(vc_response.primitive.responsePrimitive.primitiveContent.crossResourceSubscription.notificationStatsInfo) == 1 ){
if((vc_response.primitive.responsePrimitive.primitiveContent.crossResourceSubscription.notificationStatsInfo.notificationStats_list[0].requestsSent == 1 ) and
(vc_response.primitive.responsePrimitive.primitiveContent.crossResourceSubscription.notificationStatsInfo.notificationStats_list[0].responsesReceived == 1 ) and
(vc_response.primitive.responsePrimitive.primitiveContent.crossResourceSubscription.notificationStatsInfo.notificationStats_list[0].notificationEventCount == 1 )) {
setverdict(pass, __SCOPE__ & ": INFO: notifications recorded correctly");
}
else{
......@@ -3457,7 +3461,9 @@ module OneM2M_Testcases_CSE_Release_4 {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_retrieveContentResponse))) -> value vc_response {
tc_ac.stop;
if(ispresent(vc_response.primitive.responsePrimitive.primitiveContent.crossResourceSubscription.notificationStatsInfo)) {
if(sizeof(vc_response.primitive.responsePrimitive.primitiveContent.crossResourceSubscription.notificationStatsInfo) == 1 ){
if((vc_response.primitive.responsePrimitive.primitiveContent.crossResourceSubscription.notificationStatsInfo.notificationStats_list[0].requestsSent == 1 ) and
(vc_response.primitive.responsePrimitive.primitiveContent.crossResourceSubscription.notificationStatsInfo.notificationStats_list[0].responsesReceived == 1 ) and
(vc_response.primitive.responsePrimitive.primitiveContent.crossResourceSubscription.notificationStatsInfo.notificationStats_list[0].notificationEventCount == 1 )) {
setverdict(pass, __SCOPE__ & ": INFO: notifications recording stopped and kept correctly");
}
else{
......@@ -3756,16 +3762,16 @@ module OneM2M_Testcases_CSE_Release_4 {
vc_ae1.start(f_cse_deleteResource(v_crossResourceSubscriptionIndex)); // Handling deletion of subscription resource
// Test Body
v_updateRequest := mw_updateSubscription(v_aeResourceAddress, v_targetResourceAddress);
v_updateRequest := mw_updateSubscription(v_aeResourceAddress, ?);
v_updateRequest.primitiveContent.subscription.notificationURI := {"WhateverTarget"};
tc_ac.start;
alt {
[] mccPortIn.receive(mw_request(v_updateRequest, {"associatedCrossResourceSub"})) -> value vc_request {
setverdict(pass, __SCOPE__ & ": Subscription UPDATE Request primitive received successfully");
f_processUpdateRequestPrimitive(vc_request.primitive.requestPrimitive);
f_processUpdateRequestPrimitive(vc_request.primitive.requestPrimitive, -, v_targetResourceIndex);
f_send(e_mccPortIn, m_response(vc_response.primitive.responsePrimitive));
}
[] mccPortIn.receive(mw_request(mw_update(v_aeResourceAddress, v_targetResourceAddress))) -> value vc_request {
[] mccPortIn.receive(mw_request(mw_update(v_aeResourceAddress, ?))) -> value vc_request {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong UPDATE request received");
f_send(e_mccPortIn, m_response(m_responsePrimitive(int4000, vc_request.primitive.requestPrimitive.requestIdentifier)));
......@@ -3844,7 +3850,9 @@ module OneM2M_Testcases_CSE_Release_4 {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_retrieveContentResponse))) -> value vc_response {
tc_ac.stop;
if(ispresent(vc_response.primitive.responsePrimitive.primitiveContent.subscription.notificationStatsInfo)) {
if(sizeof(vc_response.primitive.responsePrimitive.primitiveContent.subscription.notificationStatsInfo) == 1 ){
if((vc_response.primitive.responsePrimitive.primitiveContent.subscription.notificationStatsInfo.notificationStats_list[0].requestsSent == 1 ) and
(vc_response.primitive.responsePrimitive.primitiveContent.subscription.notificationStatsInfo.notificationStats_list[0].responsesReceived == 1 ) and
(vc_response.primitive.responsePrimitive.primitiveContent.subscription.notificationStatsInfo.notificationStats_list[0].notificationEventCount == 1 )) {
setverdict(pass, __SCOPE__ & ": INFO: notifications recorded correctly");
}
else{
......@@ -3947,7 +3955,9 @@ module OneM2M_Testcases_CSE_Release_4 {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_retrieveContentResponse))) -> value vc_response {
tc_ac.stop;
if(ispresent(vc_response.primitive.responsePrimitive.primitiveContent.subscription.notificationStatsInfo)) {
if(sizeof(vc_response.primitive.responsePrimitive.primitiveContent.subscription.notificationStatsInfo) == 1 ){
if((vc_response.primitive.responsePrimitive.primitiveContent.subscription.notificationStatsInfo.notificationStats_list[0].requestsSent == 1 ) and
(vc_response.primitive.responsePrimitive.primitiveContent.subscription.notificationStatsInfo.notificationStats_list[0].responsesReceived == 1 ) and
(vc_response.primitive.responsePrimitive.primitiveContent.subscription.notificationStatsInfo.notificationStats_list[0].notificationEventCount == 1 )) {
setverdict(pass, __SCOPE__ & ": INFO: notifications recorded correctly");
}
else{
......@@ -4050,7 +4060,9 @@ module OneM2M_Testcases_CSE_Release_4 {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_retrieveContentResponse))) -> value vc_response {
tc_ac.stop;
if(ispresent(vc_response.primitive.responsePrimitive.primitiveContent.subscription.notificationStatsInfo)) {
if(sizeof(vc_response.primitive.responsePrimitive.primitiveContent.subscription.notificationStatsInfo) == 1 ){
if((vc_response.primitive.responsePrimitive.primitiveContent.subscription.notificationStatsInfo.notificationStats_list[0].requestsSent == 1 ) and
(vc_response.primitive.responsePrimitive.primitiveContent.subscription.notificationStatsInfo.notificationStats_list[0].responsesReceived == 1 ) and
(vc_response.primitive.responsePrimitive.primitiveContent.subscription.notificationStatsInfo.notificationStats_list[0].notificationEventCount == 1 )) {
setverdict(pass, __SCOPE__ & ": INFO: notifications recorded correctly");
}
else{
......
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