Commit 95feef6c authored by Elian Kraja's avatar Elian Kraja
Browse files

Fixing structure

parent 2a26a7f5
Loading
Loading
Loading
Loading
+0 −478
Original line number Original line Diff line number Diff line
/*
Copyright (c) ETSI 2018.

This software is subject to copyrights owned by ETSI. Non-exclusive permission
is hereby granted, free of charge, to copy, reproduce and amend this file
under the following conditions: It is provided "as is", without warranty of any
kind, expressed or implied.

ETSI shall never be liable for any claim, damages, or other liability arising
from its use or inability of use.This permission does not apply to any documentation
associated with this file for which ETSI keeps all rights reserved. The present
copyright notice shall be included in all copies of whole or part of this
file and shall not imply any sub-license right.
*/

Package MEC012_APP_MP1_RNI_SUBS_BO_BI {
   
   import all from MEC_Common;
   import all from MEC_012_Domain;

   Test Purpose {
      TP Id "TP_MEC025_RNI_SUBSCRIPTION_05_NEG_A"       // Negative test: Trying to get a 400 Bad Request using incorrect parameters (Not existent subscriptionType)
      
      Test objective 
         "Check that the RNIS service responds with an error when it receives a request to get all RNIS subscriptions"
      
      Reference "ETSI GS MEC 012 1.1.1, clause 7.6.3.1", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/CellChangeSubscription"
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_ALL_SUBSCRIPTIONS

      Initial conditions  with {
         the IUT entity having a RNIS_subscription containing
             subscriptionHref indicating value SUBSCRIPTION_HREF_VALUE,
            subscriptionType indicating value "CellChangeSubscription"
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vGET containing
               uri indicating value "/rni/v1/subscriptions",
               query_parameters containing
                  subscriptionType indicating value "wrongSubscriptionType"
               ;
            ; from the MEC_SUB entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "400 Bad Request"
            ; to the MEC_SUB entity
         }
      }       
   }
   

   Test Purpose {
      TP Id "TP_MEC025_RNI_SUBSCRIPTION_05_NEG_B"       // Negative test: Trying to get a 401 Unauthorized (Client did not submit credentials)
      
      Test objective 
         "Check that the RNIS service responds with an error when it receives a request to get all RNIS subscriptions"
      
      Reference "ETSI GS MEC 012 1.1.1, clause 7.6.3.1", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/CellChangeSubscription"
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_ALL_SUBSCRIPTIONS

      Initial conditions  with {
         the IUT entity having a RNIS_subscription containing
            subscriptionHref indicating value SUBSCRIPTION_HREF_VALUE,
            subscriptionType indicating value "CellChangeSubscription"
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vGET containing
               uri indicating value "/rni/v1/subscriptions",
               query_parameters containing
                  subscriptionHref indicating value SUBSCRIPTION_HREF_VALUE,
                  subscriptionType indicating value "CellChangeSubscription"
               ;,
               "not" authorization                                             // Token not provided
            ; from the MEC_SUB entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "401 Unauthorized"
            ; to the MEC_SUB entity
         }
      }       
   }
   
   
   Test Purpose {
      TP Id "TP_MEC025_RNI_SUBSCRIPTION_05_NEG_C"       // Negative test: Trying to get a 401 Unauthorized (Invalid token)
      
      Test objective 
         "Check that the RNIS service responds with an error when it receives a request to get all RNIS subscriptions"
      
      Reference "ETSI GS MEC 012 1.1.1, clause 7.6.3.1", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/CellChangeSubscription"
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_ALL_SUBSCRIPTIONS

      Initial conditions  with {
         the IUT entity having a RNIS_subscription containing
            subscriptionHref indicating value SUBSCRIPTION_HREF_VALUE,
            subscriptionType indicating value "CellChangeSubscription"
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vGET containing
               uri indicating value "/rni/v1/subscriptions",
               headers set to vHeadersInvalidToken,                            // Invalid token
               query_parameters containing
                  subscriptionHref indicating value SUBSCRIPTION_HREF_VALUE,
                  subscriptionType indicating value "CellChangeSubscription"
               ;
            ; from the MEC_SUB entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "401 Unauthorized"
            ; to the MEC_SUB entity
         }
      }       
   }
      
   Test Purpose {
      TP Id "TP_MEC025_RNI_SUBSCRIPTION_05_NEG_D"       // Negative test: 404 Not found
      
      Test objective 
         "Check that the RNIS service responds with an error when it receives a request to get all RNIS subscriptions"
      
      Reference "ETSI GS MEC 012 1.1.1, clause 7.6.3.1", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/CellChangeSubscription"
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_ALL_SUBSCRIPTIONS

      Initial conditions  with {
         the IUT entity having a RNIS_subscription containing
            subscriptionHref indicating value SUBSCRIPTION_HREF_VALUE,
            subscriptionType indicating value "CellChangeSubscription"
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vGET containing
               uri indicating value "/rni/v1/subscrition",                       // Wrong URI
               query_parameters containing
                  subscriptionHref indicating value SUBSCRIPTION_HREF_VALUE,
                  subscriptionType indicating value "CellChangeSubscription"
               ;
            ; from the MEC_SUB entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "404 Not Found"
            ; to the MEC_SUB entity
         }
      }       
   }
   
 
   Test Purpose {
      TP Id "TP_MEC025_RNI_SUBSCRIPTION_05_NEG_E"       // Negative test: 406 Not acceptable. Using Accept header as application/octet-stream
      
      Test objective 
         "Check that the RNIS service responds with an error when it receives a request to get all RNIS subscriptions"
      
      Reference "ETSI GS MEC 012 1.1.1, clause 7.6.3.1", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/CellChangeSubscription"
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_ALL_SUBSCRIPTIONS

      Initial conditions  with {
         the IUT entity having a RNIS_subscription containing
            subscriptionHref indicating value SUBSCRIPTION_HREF_VALUE,
            subscriptionType indicating value "CellChangeSubscription"
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vGET containing
               uri indicating value "/rni/v1/subscriptions",
               headers set to vHeadersAcceptKO,
               query_parameters containing
                  subscriptionHref indicating value SUBSCRIPTION_HREF_VALUE,
                  subscriptionType indicating value "CellChangeSubscription"
               ;
            ; from the MEC_SUB entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "406 Not Acceptable"
            ; to the MEC_SUB entity
         }
      }       
   }
   
//   Test Purpose {
//      TP Id "TP_MEC025_RNI_SUBSCRIPTION_05_NEG_F"       // Negative test: 403 Forbidden. 
//      
//      Test objective 
//         "Check that the RNIS service responds with an error when it receives a request to get all RNIS subscriptions"
//      
//      Reference "ETSI GS MEC 012 1.1.1, clause 7.6.3.1", 
//         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/CellChangeSubscription"
//      Config Id Config_MEC_1
//      PICS Selection PIC_RNIS and PIC_RNIS_ALL_SUBSCRIPTIONS
//
//      Initial conditions  with {
//         the IUT entity having a RNIS_subscription containing
//            subscriptionHref indicating value SUBSCRIPTION_HREF_VALUE,
//            subscriptionType indicating value "CellChangeSubscription"
//         ;
//      }
//
//      Expected behaviour
//      ensure that {
//         when {
//            the IUT entity receives a vGET containing
//               uri indicating value "/rni/v1/subscriptions",
//               headers set to vHeadersAcceptKO,
//               query_parameters containing
//                  subscriptionHref indicating value SUBSCRIPTION_HREF_VALUE,
//                  subscriptionType indicating value "CellChangeSubscription"
//               ;
//            ; from the MEC_SUB entity
//         }
//         then {
//            the IUT entity sends a HTTP_RESPONSE containing
//               status set to HTTP_406_NOT_ACCEPTABLE,
//               body containing
//                  problemDetails containing
//                     status set to 406,
//                     detail set to any_value
//                  ;
//               ;
//            ; to the MEC_SUB entity
//         }
//      }       
//   }   
 
 
 
   Test Purpose {
      TP Id "TP_MEC025_RNI_SUBSCRIPTION_01_NEG_A"                      // 400 Bad Request
      
      Test objective 
         "Check that the RNIS service responds with an error when a request to create a new RNIS subscription is done"
      
      Reference "ETSI GS MEC 012 1.1.1, clause 7.6.3.4", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/CellChangeSubscription"
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_ALL_SUBSCRIPTIONS

      Initial conditions  with {
         the IUT entity being_in idle_state
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPOST containing
               uri indicating value "/rni/v1/subscriptions",
               body containing
                  CellChangeSubscription containing
                     subscritionType indicating value "CelCangeSubscription",
                     callbackReference indicating value CALLBACK_URI,
                     filterCriteriaAssocHo containing
                        appInsId set to APP_INS_ID,
                        associateId set to ASSOCIATE_ID_LIST,
                        ecgi set to ECGI,
                        hoStatus set to HO_STATUS
                     ;,
                     expiryDeadline set to EXPIRY_DEADLINE
                  ;
               ; 
            ; from the MEC_SUB entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "400 Bad Request"
            ; to the MEC_SUB entity
         }
      }       
   }


   Test Purpose {
      TP Id "TP_MEC025_RNI_SUBSCRIPTION_01_NEG_B"                      // 401 Unauthorized (No Token)
      
      Test objective 
         "Check that the RNIS service responds with an error when a request to create a new RNIS subscription is done"
      
      Reference "ETSI GS MEC 012 1.1.1, clause 7.6.3.4", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/CellChangeSubscription"
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_ALL_SUBSCRIPTIONS

      Initial conditions  with {
         the IUT entity being_in idle_state
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPOST containing
               uri indicating value "/rni/v1/subscriptions",
               "not" authorized,
               body containing
                  CellChangeSubscription containing
                     subscriptionType indicating value "CellChangeSubscription",
                     callbackReference indicating value CALLBACK_URI,
                     filterCriteriaAssocHo containing
                        appInsId set to APP_INS_ID,
                        associateId set to ASSOCIATE_ID_LIST,
                        ecgi set to ECGI,
                        hoStatus set to HO_STATUS
                     ;,
                     expiryDeadline set to EXPIRY_DEADLINE
                  ;
               ; 
            ; from the MEC_SUB entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "401 Unauthorized"
            ; to the MEC_SUB entity
         }
      }       
   }
   
   
   Test Purpose {
      TP Id "TP_MEC025_RNI_SUBSCRIPTION_01_NEG_C"                      // 401 Unauthorized (Wrong token)
      
      Test objective 
         "Check that the RNIS service responds with an error when a request to create a new RNIS subscription is done"
      
      Reference "ETSI GS MEC 012 1.1.1, clause 7.6.3.4", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/CellChangeSubscription"
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_ALL_SUBSCRIPTIONS

      Initial conditions  with {
         the IUT entity being_in idle_state
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPOST containing
               uri indicating value "/rni/v1/subscriptions",
               headers set to vHeadersInvalidToken,                     // wrong token
               body containing
                  CellChangeSubscription containing
                     subscriptionType indicating value "CellChangeSubscription",
                     callbackReference indicating value CALLBACK_URI,
                     filterCriteriaAssocHo containing
                        appInsId set to APP_INS_ID,
                        associateId set to ASSOCIATE_ID_LIST,
                        ecgi set to ECGI,
                        hoStatus set to HO_STATUS
                     ;,
                     expiryDeadline set to EXPIRY_DEADLINE
                  ;
               ; 
            ; from the MEC_SUB entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "401 Unauthorized"
            ; to the MEC_SUB entity
         }
      }       
   }   

   Test Purpose {
      TP Id "TP_MEC025_RNI_SUBSCRIPTION_01_NEG_C"                      // 404 not Found (Wrong URI)
      
      Test objective 
         "Check that the RNIS service responds with an error when a request to create a new RNIS subscription is done"
      
      Reference "ETSI GS MEC 012 1.1.1, clause 7.6.3.4", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/CellChangeSubscription"
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_ALL_SUBSCRIPTIONS

      Initial conditions  with {
         the IUT entity being_in idle_state
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPOST containing
               uri indicating value "/rnis/v1/subscription",              // wrong URI
               body containing
                  CellChangeSubscription containing
                     subscriptionType indicating value "CellChangeSubscription",
                     callbackReference indicating value CALLBACK_URI,
                     filterCriteriaAssocHo containing
                        appInsId set to APP_INS_ID,
                        associateId set to ASSOCIATE_ID_LIST,
                        ecgi set to ECGI,
                        hoStatus set to HO_STATUS
                     ;,
                     expiryDeadline set to EXPIRY_DEADLINE
                  ;
               ; 
            ; from the MEC_SUB entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "404 Not Found"
            ; to the MEC_SUB entity
         }
      }       
   } 


   Test Purpose {
      TP Id "TP_MEC025_RNI_SUBSCRIPTION_01_NEG_D"                      // 406 not acceptable (client accepts only application/octet-stream content format)
      
      Test objective 
         "Check that the RNIS service responds with an error when a request to create a new RNIS subscription is done"
      
      Reference "ETSI GS MEC 012 1.1.1, clause 7.6.3.4", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/CellChangeSubscription"
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_ALL_SUBSCRIPTIONS

      Initial conditions  with {
         the IUT entity being_in idle_state
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPOST containing
               uri indicating value "/rni/v1/subscriptions",
               headers set to vHeadersAcceptKO,
               body containing
                  CellChangeSubscription containing
                     subscriptionType indicating value "CellChangeSubscription",
                     callbackReference indicating value CALLBACK_URI,
                     filterCriteriaAssocHo containing
                        appInsId set to APP_INS_ID,
                        associateId set to ASSOCIATE_ID_LIST,
                        ecgi set to ECGI,
                        hoStatus set to HO_STATUS
                     ;,
                     expiryDeadline set to EXPIRY_DEADLINE
                  ;
               ; 
            ; from the MEC_SUB entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "406 Not Acceptable"
            ; to the MEC_SUB entity
         }
      }       
   } 

}
+0 −128
Original line number Original line Diff line number Diff line
/*
Copyright (c) ETSI 2018.

This software is subject to copyrights owned by ETSI. Non-exclusive permission
is hereby granted, free of charge, to copy, reproduce and amend this file
under the following conditions: It is provided "as is", without warranty of any
kind, expressed or implied.

ETSI shall never be liable for any claim, damages, or other liability arising
from its use or inability of use.This permission does not apply to any documentation
associated with this file for which ETSI keeps all rights reserved. The present
copyright notice shall be included in all copies of whole or part of this
file and shall not imply any sub-license right.
*/

Package MEC012_APP_MP1_RNI_SUBS_BV {
   
   import all from MEC_Common;
   import all from MEC_012_Domain;
   
   Test Purpose {
      TP Id "TP_MEC025_RNI_SUBSCRIPTION_05"
      
      Test objective 
         "Check that the RNIS service sends all RNIS subscriptions when requested"
      
      Reference "ETSI GS MEC 012 1.1.1, clause 7.6.3.1", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/CellChangeSubscription"
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_ALL_SUBSCRIPTIONS

      Initial conditions  with {
         the IUT entity having a RNIS_subscription containing
            subscriptionHref indicating value SUBSCRIPTION_HREF_VALUE,
            subscriptionType indicating value "CellChangeSubscription"
         ;
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vGET containing
               uri indicating value "/rni/v1/subscriptions",
               query_parameters containing
                  subscriptionType indicating value "CellChangeSubscription"
               ;
            ; from the MEC_SUB entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "200 OK",
               body containing
                  subscriptionLinkList containing
                     _links containing
                        self set to SUBSCRIPTION_HREF_VALUE
                     ;,
                     CellChangeSubscription containing
                        href indicating value SUBSCRIPTION_HREF_VALUE,
                        subscriptionType indicating value "CellChangeSubscription"
                     ;
                  ;
               ;
            ; to the MEC_SUB entity
         }
      }       
   }


   
   Test Purpose {
      TP Id "TP_MEC025_RNI_SUBSCRIPTION_01"
      
      Test objective 
         "Check that the RNIS service creates a new RNIS subscription"
      
      Reference "ETSI GS MEC 012 1.1.1, clause 7.6.3.4", 
         "https://forge.etsi.org/gitlab/mec/gs012-rnis-api/blob/master/RniAPI.yaml#/definitions/CellChangeSubscription"
      Config Id Config_MEC_1
      PICS Selection PIC_RNIS and PIC_RNIS_ALL_SUBSCRIPTIONS

      Initial conditions  with {
         the IUT entity being_in idle_state
      }

      Expected behaviour
      ensure that {
         when {
            the IUT entity receives a vPOST containing
               uri indicating value "/rni/v1/subscriptions",
               body containing
                  CellChangeSubscription containing
                     subscriptionType indicating value "CellChangeSubscription",
                     callbackReference indicating value CALLBACK_URI,
                     filterCriteriaAssocHo containing
                        appInsId set to APP_INS_ID,
                        associateId set to ASSOCIATE_ID_LIST,
                        ecgi set to ECGI,
                        hoStatus set to HO_STATUS
                     ;,
                     expiryDeadline set to EXPIRY_DEADLINE
                  ;
               ; 
            ; from the MEC_SUB entity
         }
         then {
            the IUT entity sends a HTTP_RESPONSE containing
               status set to "201 Created",
               body containing
                  CellChangeSubscription containing
                     subscriptionType indicating value "CellChangeSubscription",
                     callbackReference indicating value CALLBACK_URI,
                     _links containing
                        self set to SUBSCRIPTION_HREF_VALUE
                     ;,
                     filterCriteriaAssocHo containing
                        appInsId set to APP_INS_ID,
                        associateId set to ASSOCIATE_ID_LIST,
                        ecgi set to ECGI,
                        hoStatus set to HO_STATUS
                     ;,
                     expiryDeadline set to EXPIRY_DEADLINE
                  ;
               ;
            ; to the MEC_SUB entity
         }
      }       
   }
}
+0 −208

File deleted.

Preview size limit exceeded, changes collapsed.

+0 −193

File deleted.

Preview size limit exceeded, changes collapsed.

+0 −175

File deleted.

Preview size limit exceeded, changes collapsed.

Loading