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

Add TC_ECRF_LOST_BV_13

Add Ellipse to templates
parent 8f160a4f
Loading
Loading
Loading
Loading
+21 −1
Original line number Diff line number Diff line
@@ -69,6 +69,26 @@ module AtsECRF_Pixits {
  modulepar XSD.Double PX_CIRCLE_INTERSECT_MAINLY_G1_AND_G2_RADIUS := 3000.000;
  modulepar XSD.AnyURI PX_CIRCLE_INTERSECT_MAINLY_G1_AND_G2_UOM := "urn:ogc:def:uom:EPSG::9001";

  // PX_ELLIPSE_IN_G1
  modulepar DoubleList PX_ELLIPSE_IN_G1_CENTER := { 43.58206959563555, 6.974515914916991 };
  modulepar XSD.Double PX_ELLIPSE_IN_G1_MAJOR_AXIS := 400.000;
  modulepar XSD.AnyURI PX_ELLIPSE_IN_G1_MAJOR_AXIS_UOM := "urn:ogc:def:uom:EPSG::9001";
  modulepar XSD.Double PX_ELLIPSE_IN_G1_MINOR_AXIS := 200.000;
  modulepar XSD.AnyURI PX_ELLIPSE_IN_G1_MINOR_AXIS_UOM := "urn:ogc:def:uom:EPSG::9001";
  modulepar XSD.Double PX_ELLIPSE_IN_G1_ORIENTATION := 43.2;
  modulepar XSD.AnyURI PX_ELLIPSE_IN_G1_ORIENTATION_UOM := "urn:ogc:def:uom:EPSG::9002";

  // PX_ARCBAND_IN_G1
  modulepar DoubleList PX_ARCBAND_IN_G1_CENTER := { 43.58206959563555, 6.974515914916991 };
  modulepar XSD.Double PX_ARCBAND_IN_G1_INNER_RADIUS := 400.000;
  modulepar XSD.AnyURI PX_ARCBAND_IN_G1_INNER_RADIUS_UOM := "urn:ogc:def:uom:EPSG::9001";
  modulepar XSD.Double PX_ARCBAND_IN_G1_OUTER_RADIUS := 200.000;
  modulepar XSD.AnyURI PX_ARCBAND_IN_G1_OUTER_RADIUS_UOM := "urn:ogc:def:uom:EPSG::9001";
  modulepar XSD.Double PX_ARCBAND_IN_G1_START_ANGLE := 20.0;
  modulepar XSD.AnyURI PX_ARCBAND_IN_G1_START_ANGLE_UOM := "urn:ogc:def:uom:EPSG::9002";
  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";  

  // POLICE G1
  modulepar XSD.AnyURI PX_URI_POLICE_G1 := "sip:police@g1.esinet.io";
  modulepar XSD.String PX_DISPLAY_NAME_POLICE_G1 := "Police G1";
+64 −0
Original line number Diff line number Diff line
@@ -713,6 +713,70 @@ module AtsECRF_TestCases {
        f_cf_01_http_down();
    } // End of testcase TC_ECRF_LOST_BV_12

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

      // Test component configuration
      f_cf_01_http_up();

      template (omit) EllipseType ellipse := m_ellipse(
                              m_center_group_pos(PX_ELLIPSE_IN_G1_CENTER),
                              { uom := PX_ELLIPSE_IN_G1_MAJOR_AXIS_UOM, base := PX_ELLIPSE_IN_G1_MAJOR_AXIS },
                              { uom := PX_ELLIPSE_IN_G1_MINOR_AXIS_UOM, base := PX_ELLIPSE_IN_G1_MINOR_AXIS },
                              { uom := PX_ELLIPSE_IN_G1_ORIENTATION_UOM, base := PX_ELLIPSE_IN_G1_ORIENTATION }
      );

      // Preamble
      f_sendFindServiceRequest(
        m_find_service_request(
                                {
                                  m_location(
                                              PX_LOCATION_ID,
                                              { m_extension_point(encvalue_unichar(valueof(ellipse))) },
                                              "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 
+20 −0
Original line number Diff line number Diff line
@@ -857,6 +857,26 @@ module LibItsHttp_XmlTemplates {
      radius := p_radius
    } // End of template mw_circle
    
   template (omit) EllipseType m_ellipse(
                                        in template (value) CenterGroup p_centerGroup,
                                        in template (value) LengthType p_semiMajorAxis,
                                        in template (value) LengthType p_semiMinorAxis,
                                        in template (value) AngleType p_orientation,
                                        in template (omit) XSD.AnyURI p_srsName := omit,
                                        in template (omit) XSD.AnyURI p_id := omit
                                        ) := {
      axisLabels := omit,
      gid := omit,
      id := omit,
      srsDimension := omit,
      srsName := p_srsName,
      uomLabels := omit,
      centerGroup := p_centerGroup,
      semiMajorAxis := p_semiMajorAxis,
      semiMinorAxis := p_semiMinorAxis,
      orientation   := p_orientation
    } // End of template m_circle  

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