Commit 20e0fea3 authored by Filipe Ferreira's avatar Filipe Ferreira
Browse files

One test per specification.

parent b0b810e4
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ Package MEC_011_Domain {
      - receives              // IUT receives an HTTP request
      - sends                 // IUT sends an HTTP response
      - being_in
      - having
      - idle_state // Idle state: The MEC platform has services running and MEC Application is authorized to consume services
      - subscribed_to
      ;
+45 −97
Original line number Diff line number Diff line
@@ -43,17 +43,14 @@ Package MEC_011_mp1 {
      Expected behaviour
          ensure that {
              when {
                  the IUT entity receives a GET containing
                      Uri indicating value "/mp1/v1/services",                 
                      Host indicating value IUT_HOSTNAME,
                      Token indicating value VALID_TOKEN,
                      Content_type indicating value CONTENT_JSON
                  the IUT entity receives a vGET containing
                      Uri indicating value "/mp1/v1/services"
                  ;
              }
              then {
                  the IUT entity sends a Response containing
                      Status_Code set to HTTP_200_OK,
                      Content_type indicating value CONTENT_JSON,
                      Content_type set to CONTENT_JSON,
                      body containing
                        valid_serviceInfo_list;
                  ;
@@ -85,11 +82,8 @@ Package MEC_011_mp1 {
      Expected behaviour
          ensure that {
              when {
                  the IUT entity receives a POST containing
                  the IUT entity receives a vPOST containing
                      Uri indicating value "/mp1/v1/services",
                      Host indicating value IUT_HOSTNAME,
                      Token indicating value VALID_TOKEN,
                      Content_type indicating value CONTENT_JSON
                      body containing
                         serviceInfo set to SERVICE_INFO_SAMPLE_1
                      ;
@@ -137,24 +131,23 @@ Package MEC_011_mp1 {
      PICS Selection PIC_MEC_PLAT PIC_SERVICES

      Initial conditions  with {
         the IUT entity being_in idle_state
         the IUT entity being_in idle_state and
         the IUT entity having a services_running containing   // TODO This intends to say there's a service running 
            service_id indicating value SERVICE_ID;            // with ID SERVICE_ID. Is this the proper way?
      }

      // MEC 011, clause 5.2.5
      Expected behaviour
          ensure that {
              when {
                  the IUT entity receives a GET containing
                      Uri indicating value "/mp1/v1/services/{serviceId}",    // TODO How to set this URL with the {serviceId}?
                      Host indicating value IUT_HOSTNAME,
                      Token indicating value VALID_TOKEN,
                      Content_type indicating value CONTENT_JSON
                  the IUT entity receives a vGET containing
                      Uri indicating value "/mp1/v1/services/SERVICE_ID" // TODO is this the proper syntax reference to the Service_ID variable
                  ;
              }
              then {
                  the IUT entity sends a Response containing
                      Status_Code set to HTTP_200_OK,
                      Content_type indicating value CONTENT_JSON,
                      Content_type set to CONTENT_JSON,
                      body containing
                        valid_serviceInfo;
                  ;
@@ -184,11 +177,8 @@ Package MEC_011_mp1 {
      Expected behaviour
          ensure that {
              when {
                  the IUT entity receives a PUT containing
                  the IUT entity receives a vPUT containing
                      Uri indicating value "/mp1/v1/services/{serviceId}",    // TODO How to set this URL with the {serviceId}?
                      Host indicating value IUT_HOSTNAME,
                      Token indicating value VALID_TOKEN,
                      Content_type indicating value CONTENT_JSON
                      body containing
                         serviceInfo set to SERVICE_INFO_SAMPLE_2
                      ;
@@ -233,17 +223,14 @@ Package MEC_011_mp1 {
      Expected behaviour
          ensure that {
              when {
                  the IUT entity receives a GET containing
                      Uri indicating value "mp1/v1/applications/{appInstanceId}/subscriptions",    // TODO How to set this URL with the {appInstanceId}?
                      Host indicating value IUT_HOSTNAME,
                      Token indicating value VALID_TOKEN,
                      Content_type indicating value CONTENT_JSON
                  the IUT entity receives a vGET containing
                      Uri indicating value "mp1/v1/applications/{appInstanceId}/subscriptions"    // TODO How to set this URL with the {appInstanceId}?
                  ;
              }
              then {
                  the IUT entity sends a Response containing
                      Status_Code set to HTTP_200_OK,
                      Content_type indicating value CONTENT_JSON,
                      Content_type set to CONTENT_JSON,
                      body containing
                        valid_Mp1SubscriptionLinkList;
                  ;
@@ -273,11 +260,8 @@ Package MEC_011_mp1 {
      Expected behaviour
          ensure that {
              when {
                  the IUT entity receives a POST containing
                  the IUT entity receives a vPOST containing
                      Uri indicating value "mp1/v1/applications/{appInstanceId}/subscriptions",    // TODO How to set this URL with the {appInstanceId}?
                      Host indicating value IUT_HOSTNAME,
                      Token indicating value VALID_TOKEN,
                      Content_type indicating value CONTENT_JSON
                      body containing
                         SerAvailabilityNotificationSubscription set to SERVICE_AVAIL_NOTIF_SUBS_SAMPLE_1
                      ;
@@ -323,17 +307,14 @@ Package MEC_011_mp1 {
      Expected behaviour
          ensure that {
              when {
                  the IUT entity receives a GET containing
                      Uri indicating value "mp1/v1/applications/{appInstanceId}/subscriptions/{subscriptionId}",    // TODO How to set this URL with the {appInstanceId} and {subscriptionId}?
                      Host indicating value IUT_HOSTNAME,
                      Token indicating value VALID_TOKEN,
                      Content_type indicating value CONTENT_JSON
                  the IUT entity receives a vGET containing
                      Uri indicating value "mp1/v1/applications/{appInstanceId}/subscriptions/{subscriptionId}"    // TODO How to set this URL with the {appInstanceId} and {subscriptionId}?
                  ;
              }
              then {
                  the IUT entity sends a Response containing
                      Status_Code set to HTTP_200_OK,
                      Content_type indicating value CONTENT_JSON,
                      Content_type set to CONTENT_JSON,
                      body containing
                        valid_SerAvailabilityNotificationSubscription;
                  ;
@@ -363,17 +344,14 @@ Package MEC_011_mp1 {
      Expected behaviour
          ensure that {
              when {
                  the IUT entity receives a DELETE containing
                      Uri indicating value "mp1/v1/applications/{appInstanceId}/subscriptions/{subscriptionId}",    // TODO How to set this URL with the {appInstanceId} and {subscriptionId}?
                      Host indicating value IUT_HOSTNAME,
                      Token indicating value VALID_TOKEN,
                      Content_type indicating value CONTENT_JSON
                  the IUT entity receives a vDELETE containing
                      Uri indicating value "mp1/v1/applications/{appInstanceId}/subscriptions/{subscriptionId}"    // TODO How to set this URL with the {appInstanceId} and {subscriptionId}?
                  ;
              }
              then {
                  the IUT entity sends a Response containing
                      Status_Code set to HTTP_204_NO_CONTENT,
                      Content_type indicating value CONTENT_JSON
                      Content_type set to CONTENT_JSON
                  ;
              }
         }
@@ -404,17 +382,14 @@ Package MEC_011_mp1 {
      Expected behaviour
          ensure that {
              when {
                  the IUT entity receives a GET containing
                      Uri indicating value "mp1/v1/timing/timing_caps",
                      Host indicating value IUT_HOSTNAME,
                      Token indicating value VALID_TOKEN,
                      Content_type indicating value CONTENT_JSON
                  the IUT entity receives a vGET containing
                      Uri indicating value "mp1/v1/timing/timing_caps"
                  ;
              }
              then {
                  the IUT entity sends a Response containing
                      Status_Code set to HTTP_200_OK,
                      Content_type indicating value CONTENT_JSON,
                      Content_type set to CONTENT_JSON,
                      body containing
                        valid_TimingCaps;
                  ;
@@ -444,17 +419,14 @@ Package MEC_011_mp1 {
      Expected behaviour
          ensure that {
              when {
                  the IUT entity receives a GET containing
                      Uri indicating value "mp1/v1/timing/current_time",
                      Host indicating value IUT_HOSTNAME,
                      Token indicating value VALID_TOKEN,
                      Content_type indicating value CONTENT_JSON
                  the IUT entity receives a vGET containing
                      Uri indicating value "mp1/v1/timing/current_time"
                  ;
              }
              then {
                  the IUT entity sends a Response containing
                      Status_Code set to HTTP_200_OK,
                      Content_type indicating value CONTENT_JSON,
                      Content_type set to CONTENT_JSON,
                      body containing
                        valid_CurrentTime;
                  ;
@@ -487,17 +459,14 @@ Package MEC_011_mp1 {
      Expected behaviour
          ensure that {
              when {
                  the IUT entity receives a GET containing
                      Uri indicating value "mp1/v1/transports",
                      Host indicating value IUT_HOSTNAME,
                      Token indicating value VALID_TOKEN,
                      Content_type indicating value CONTENT_JSON
                  the IUT entity receives a vGET containing
                      Uri indicating value "mp1/v1/transports"
                  ;
              }
              then {
                  the IUT entity sends a Response containing
                      Status_Code set to HTTP_200_OK,
                      Content_type indicating value CONTENT_JSON,
                      Content_type set to CONTENT_JSON,
                      body containing
                        valid_TransportInfo_list;
                  ;
@@ -530,17 +499,14 @@ Package MEC_011_mp1 {
      Expected behaviour
          ensure that {
              when {
                  the IUT entity receives a GET containing
                      Uri indicating value "mp1/v1/applications/{appInstanceId}/traffic_rules",    // TODO How to set this URL with the {appInstanceId}?
                      Host indicating value IUT_HOSTNAME,
                      Token indicating value VALID_TOKEN,
                      Content_type indicating value CONTENT_JSON
                  the IUT entity receives a vGET containing
                      Uri indicating value "mp1/v1/applications/{appInstanceId}/traffic_rules"    // TODO How to set this URL with the {appInstanceId}?
                  ;
              }
              then {
                  the IUT entity sends a Response containing
                      Status_Code set to HTTP_200_OK,
                      Content_type indicating value CONTENT_JSON,
                      Content_type set to CONTENT_JSON,
                      body containing
                        valid_TrafficRule_list;
                  ;
@@ -570,17 +536,14 @@ Package MEC_011_mp1 {
      Expected behaviour
          ensure that {
              when {
                  the IUT entity receives a GET containing
                      Uri indicating value "mp1/v1/applications/{appInstanceId}/traffic_rules/{trafficRuleId}",    // TODO How to set this URL with the {appInstanceId} and {trafficRuleId}?
                      Host indicating value IUT_HOSTNAME,
                      Token indicating value VALID_TOKEN,
                      Content_type indicating value CONTENT_JSON
                  the IUT entity receives a vGET containing
                      Uri indicating value "mp1/v1/applications/{appInstanceId}/traffic_rules/{trafficRuleId}"    // TODO How to set this URL with the {appInstanceId} and {trafficRuleId}?
                  ;
              }
              then {
                  the IUT entity sends a Response containing
                      Status_Code set to HTTP_200_OK,
                      Content_type indicating value CONTENT_JSON,
                      Content_type set to CONTENT_JSON,
                      body containing
                        valid_TrafficRule;
                  ;
@@ -610,11 +573,8 @@ Package MEC_011_mp1 {
      Expected behaviour
          ensure that {
              when {
                  the IUT entity receives a PUT containing
                  the IUT entity receives a vPUT containing
                      Uri indicating value "mp1/v1/applications/{appInstanceId}/traffic_rules/{trafficRuleId}",    // TODO How to set this URL with the {appInstanceId} and {trafficRuleId}?
                      Host indicating value IUT_HOSTNAME,
                      Token indicating value VALID_TOKEN,
                      Content_type indicating value CONTENT_JSON
                      body containing
                         trafficRule set to TRAFFIC_RULE_SAMPLE_1
                      ;
@@ -659,17 +619,14 @@ Package MEC_011_mp1 {
      Expected behaviour
          ensure that {
              when {
                  the IUT entity receives a GET containing
                      Uri indicating value "mp1/v1/applications/{appInstanceId}/dns_rules",    // TODO How to set this URL with the {appInstanceId}?
                      Host indicating value IUT_HOSTNAME,
                      Token indicating value VALID_TOKEN,
                      Content_type indicating value CONTENT_JSON
                  the IUT entity receives a vGET containing
                      Uri indicating value "mp1/v1/applications/{appInstanceId}/dns_rules"    // TODO How to set this URL with the {appInstanceId}?
                  ;
              }
              then {
                  the IUT entity sends a Response containing
                      Status_Code set to HTTP_200_OK,
                      Content_type indicating value CONTENT_JSON,
                      Content_type set to CONTENT_JSON,
                      body containing
                        valid_DnsRule_list;
                  ;
@@ -699,17 +656,14 @@ Package MEC_011_mp1 {
      Expected behaviour
          ensure that {
              when {
                  the IUT entity receives a GET containing
                      Uri indicating value "mp1/v1/applications/{appInstanceId}/dns_rules/{dnsRuleId}",    // TODO How to set this URL with the {appInstanceId} and {dnsRuleId}?
                      Host indicating value IUT_HOSTNAME,
                      Token indicating value VALID_TOKEN,
                      Content_type indicating value CONTENT_JSON
                  the IUT entity receives a vGET containing
                      Uri indicating value "mp1/v1/applications/{appInstanceId}/dns_rules/{dnsRuleId}"    // TODO How to set this URL with the {appInstanceId} and {dnsRuleId}?
                  ;
              }
              then {
                  the IUT entity sends a Response containing
                      Status_Code set to HTTP_200_OK,
                      Content_type indicating value CONTENT_JSON,
                      Content_type set to CONTENT_JSON,
                      body containing
                        valid_DnsRule;
                  ;
@@ -739,11 +693,8 @@ Package MEC_011_mp1 {
      Expected behaviour
          ensure that {
              when {
                  the IUT entity receives a PUT containing
                  the IUT entity receives a vPUT containing
                      Uri indicating value "mp1/v1/applications/{appInstanceId}/dns_rules/{dnsRuleId}",    // TODO How to set this URL with the {appInstanceId} and {dnsRuleId}?
                      Host indicating value IUT_HOSTNAME,
                      Token indicating value VALID_TOKEN,
                      Content_type indicating value CONTENT_JSON
                      body containing
                         dnsRule set to DNS_RULE_SAMPLE_1
                      ;
@@ -786,11 +737,8 @@ Package MEC_011_mp1 {
      Expected behaviour
          ensure that {
              when {
                  the IUT entity receives a PUT containing
                  the IUT entity receives a vPUT containing
                      Uri indicating value "mp1/v1/applications/{appInstanceId}/dns_rules/{dnsRuleId}",    // TODO How to set this URL with the {appInstanceId} and {dnsRuleId}?
                      Host indicating value IUT_HOSTNAME,
                      Token indicating value VALID_TOKEN,
                      Content_type indicating value CONTENT_JSON
                      body containing
                         dnsRule set to DNS_RULE_SAMPLE_BAD_REQUEST
                      ;
+17 −0
Original line number Diff line number Diff line
Package MEC_013_DATA {

   Data { /* To be modified */
   type STRING;
   type JSON;

      JSON valid_userInfo_list; // As specified in MEC 013, clause 6.2.1

      JSON valid_AccessPointList; // As specified in MEC 013, clause 6.2.1

      JSON valid_distanceNotificationSubscription; // As specified in MEC 013, clause 6.3.2

      JSON valid_circleNotificationSubscription; // As specified in MEC 013, clause 6.3.2


   }
}
+32 −0
Original line number Diff line number Diff line
Package MEC_013_Domain {

   import all from MEC_013_DATA;

   Domain {
   pics:
   // Any PICS in this list shall reference a PICS item in MEC 025 clause 7
   - PIC_MEC_PLAT // FUT is a MEC Platform (MEC025, Table 7.8.2-1)
   - PIC_SERVICES // Implements services
   - PIC_NOTIFICATIONS // Implements notifications
   ;
   entities:
   - MEC_APP	// MEC Application using the MEC Platform Application Enablement API
   - MEC_APP_Registrant
   - MEC_APP_Subscriber
   - IUT		// MEC Platform
   ;
   events:
   - services_running      // services available in the IUT
   - started               // MEC_APP up and running
   - authorised            // MEC_APP authenticated and authorised to use services
   - consume_services      // MEC_APP can use services
   - receives              // IUT receives an HTTP request
   - sends                 // IUT sends an HTTP response
   - being_in
   - having
   - idle_state // Idle state: The MEC platform has services running and MEC Application is authorized to consume services
   - subscribed_to
   ;
   }

}
+249 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading