Commit 7d90b924 authored by Michael Proestler's avatar Michael Proestler
Browse files

Add TC_ECRF_LOST_BV_15

Add Polygon pixit and template
parent 5e2f8908
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -89,6 +89,15 @@ module AtsECRF_Pixits {
  modulepar XSD.Double PX_ARCBAND_IN_G1_OPENING_ANGLE := 20.0;
  modulepar XSD.AnyURI PX_ARCBAND_IN_G1_OPENING_ANGLE_UOM := "urn:ogc:def:uom:EPSG::9002";  

  // PX_POLYGON_IN_G1
  modulepar DoubleList PX_POLYGON_IN_G1 := { 
                                  43.60973097491503, 6.9797515869140625, 
                                  43.60973097491503, 7.010993957519531,
                                  43.630608445093486, 7.010993957519531,
                                  43.630608445093486, 6.9797515869140625,
                                  43.60973097491503, 6.9797515869140625
                              };

  // POLICE G1
  modulepar XSD.AnyURI PX_URI_POLICE_G1 := "sip:police@g1.esinet.io";
  modulepar XSD.String PX_DISPLAY_NAME_POLICE_G1 := "Police G1";
+59 −0
Original line number Diff line number Diff line
@@ -842,6 +842,65 @@ module AtsECRF_TestCases {
      f_cf_01_http_down();
    }

    /**
    * @desc "IUT successfully responds with a service URI for an Arcband in the service boundary"
    */
    testcase TC_ECRF_LOST_BV_15() runs on HttpComponent system TestAdapter {
      
      // Test control
      f_check_statements({
        { name := "PICS_ECRF_FIND_SERVICE", val := PICS_ECRF_FIND_SERVICE },
        { name := "PICS_ECRF_GEOMETRY_ARCBAND", val := PICS_ECRF_GEOMETRY_ARCBAND }
      })

      // Test component configuration
      f_cf_01_http_up();

      template (omit) PolygonType polygon := m_polygon(PX_POLYGON_IN_G1);                                          
          
      // Preamble
      f_sendFindServiceRequest(
        m_find_service_request(
                                {
                                  m_location(
                                              PX_LOCATION_ID,
                                              { m_extension_point(encvalue_unichar(valueof(polygon))) },
                                              "geodetic-2d" // TODO Use a Pixit
                                              )
                                },
                                { },
                                PX_E_POLICE_SERVICE_URN,
                                true
                              )
      );

      f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);

      // Test Body
      tc_ac.start;
      f_receiveResponse(mw_http_find_service_response(
                                                      mw_find_service_response(
                                                                                { mw_mapping(
                                                                                    mw_expires_date_time(PX_LOST_EXPIRES),
                                                                                    PX_LOST_LAST_UPDATED,
                                                                                    PX_ECRF_SOURCE,
                                                                                    PX_SOURCE_ID_POLICE_G1,
                                                                                    { mw_display_name(-, PX_DISPLAY_NAME_POLICE_G1) },
                                                                                    { PX_URI_POLICE_G1 },
                                                                                    -,
                                                                                    PX_E_POLICE_SERVICE_URN,
                                                                                    -, -, -,
                                                                                    "112"
                                                                                  )
                                                                                }
                                                                              )
                                                        )
                        );

      // Postamble
      f_cf_01_http_down();
    }

  } // End of group LOST

} // End of module AtsECRF_TestCases 
+33 −0
Original line number Diff line number Diff line
@@ -899,6 +899,39 @@ module LibItsHttp_XmlTemplates {
      openingAngle  := p_openingAngle
    } // End of template m_arcband 


    template (omit) PolygonType m_polygon(
                                          in template (omit) DoubleList p_posList,
                                          in template (omit) XSD.AnyURI p_srsName := omit
                                         ) := {
      axisLabels    := omit,
      gid           := omit,
      id            := omit,
      srsDimension  := omit,
      srsName       := p_srsName,
      uomLabels     := omit,
      exterior      := {
        ring := {         
          linearRing := {
              axisLabels    := omit,
              gid           := omit,
              id            := omit,
              srsDimension  := omit,
              srsName       := omit,
              uomLabels     := omit,             
              choice := {
                posList := {
                  count := omit,
                  base := p_posList
                }
              }
          }
        }
      }
    }



    template (value) CenterGroup m_center_group_pos(
                                                    in template (value) CenterGroup.pos p_pos
                                                    ) := {