Commit a28aa137 authored by Michael Proestler's avatar Michael Proestler
Browse files

Add TC_ECRF_LOST_BI_01

Add templates for loop error response
parent 8f8a14f6
Loading
Loading
Loading
Loading
+15 −10
Original line number Diff line number Diff line
@@ -7,11 +7,26 @@ module AtsECRF_Pics {
  */
  modulepar boolean PICS_ECRF_FIND_SERVICE := true

  /**
   * @desc Does the IUT support ListServices ?
   */
  modulepar boolean PICS_ECRF_LIST_SERVICES := true;

  /**
   * @desc Does the IUT support ListServicesByLocation ?
   */
  modulepar boolean PICS_ECRF_LIST_SERVICES_BY_LOCATION := true;

  /**
  * @desc Does the IUT support Redirect?
  */
  modulepar boolean PICS_ECRF_REDIRECT := true

  /**
  * @desc Does the IUT support Loop detection?
  */
  modulepar boolean PICS_ECRF_LOOP_DETECTION := true

  /**
   * @desc Does the IUT support geometry Point?
   */
@@ -37,16 +52,6 @@ module AtsECRF_Pics {
   */
  modulepar boolean PICS_ECRF_GEOMETRY_POLYGON := true;

  /**
   * @desc Does the IUT support ListServices ?
   */
  modulepar boolean PICS_ECRF_LIST_SERVICES := true;

  /**
   * @desc Does the IUT support ListServicesByLocation ?
   */
  modulepar boolean PICS_ECRF_LIST_SERVICES_BY_LOCATION := true;


  /**
   * @desc HTTP POST Uris
+7 −1
Original line number Diff line number Diff line
@@ -29,7 +29,13 @@ module AtsECRF_Pixits {
  
  // ECRF Configurations
  modulepar XSD.String PX_ECRF_SOURCE := "ecrf1.gridgears.plugtests.net";
  modulepar XSD.String PX_ECRF_VIA := "ecrf1.gridgears.plugtests.net"; // Should usually be the same as PX_ECRF_SOURCE
  
  // Usually the same as PX_ECRF_SOURCE
  modulepar XSD.String PX_ECRF_VIA := "ecrf1.gridgears.plugtests.net"; 

  // Usually the same as PX_ECRF_SOURCE
  modulepar XSD.Token PX_ECRF_NAPTR := "ecrf1.gridgears.plugtests.net";

  modulepar StringSet PX_CONFIGURED_SERVICES := { "urn:service:sos", "urn:service:sos.ambulance", "urn:service:sos.fire", "urn:service:sos.police" };
  modulepar XSD.Token PX_REDIRECT_TARGET := "other.ecrf.plugtests.net";

+54 −1
Original line number Diff line number Diff line
@@ -989,7 +989,60 @@ module AtsECRF_TestCases {
      // Postamble
      f_cf_01_http_down();
    }

  } // End of group LOST


  group Errors {

    /**
    * @desc "IUT responds to a findServiceRequest with a loop error response"
    */
    testcase TC_ECRF_LOST_BI_01() runs on HttpComponent system TestAdapter {
      
      // Test control
      f_check_statements({
        { name := "PICS_ECRF_FIND_SERVICE", val := PICS_ECRF_FIND_SERVICE },
        { name := "PICS_ECRF_LOOP_DETECTION", val := PICS_ECRF_LOOP_DETECTION }
      })

      // Test component configuration
      f_cf_01_http_up();

      // Preamble
      f_sendFindServiceRequest(
        m_find_service_request(
                                {
                                  m_location(
                                              PX_LOCATION_ID,
                                              { m_extension_point(encvalue_unichar(valueof(m_point(PX_POINT_IN_G1, PX_SRS_NAME, "point1")))) },
                                              "geodetic-2d" // TODO Use a Pixit
                                              )
                                },
                                { },
                                PX_E_POLICE_SERVICE_URN,
                                true,
                                omit,
                                omit,
                                LibItsHttp_XmlTemplates.m_path({LibItsHttp_XmlTemplates.m_via(PX_ECRF_NAPTR)})
                              )
      );

      f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);

      // Test Body
      tc_ac.start;
      f_receiveResponse(mw_http_find_service_response_error(
                                                            mw_exception_loop(
                                                                PX_ECRF_NAPTR,
                                                                mw_basic_exception
                                                            )
                        )
      );

      // Postamble
      f_cf_01_http_down();
    }

  }

} // End of module AtsECRF_TestCases 
+10 −0
Original line number Diff line number Diff line
@@ -715,6 +715,16 @@ module LibItsHttp_XmlTemplates {
      notLost_list := p_notLost_list
    } // End of template mw_exception_locationProfileUnrecognized

    template (present) ExceptionContainer mw_exception_loop(
                                                                                   template (present) AppUniqueString p_source := ?,
                                                                                   template (present) Loop p_loop := ?,
                                                                                   template (present) ExceptionContainer.notLost_list p_notLost_list := ?
                                                                                   ) := {
      source       := p_source,
      choice_list  := { { loop := p_loop } },
      notLost_list := p_notLost_list
    } // End of template mw_exception_locationProfileUnrecognized

    template (value) LocationUsed m_location_used(
                                                  in template (value) XSD.Token p_id
                                                     ) := {