Commit e3a0e1c7 authored by Yann Garcia's avatar Yann Garcia
Browse files

Test unit on LinearRingType

parent ab20fd60
Loading
Loading
Loading
Loading
+7 −10
Original line number Diff line number Diff line
[MODULE_PARAMETERS]
# This section shall contain the values of all parameters that are defined in your TTCN-3 modules.

# IUT roles
LibNg112_Pics.PICS_LIS_IUT := false;
LibNg112_Pics.PICS_ECRF_IUT := false;
LibNg112_Pics.PICS_ESRP_IUT := true;


LibCommon_Time.PX_TAC := 30.0

#LibItsHttp_Pics.PICS_HEADER_HOST := "lis.gridgears.io" # Used for LIS
@@ -15,10 +17,7 @@ LibItsHttp_Pics.PICS_HEADER_HOST := "ecrf.gridgears.io" # Used for ECRF
LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/lost+xml;charset=utf-8";

#LibNg112_Pics.PICS_HTTP_GET_REQUEST := false
LibNg112_Pics.PICS_ECRF_IUT := true
LibNg112_Pics.PICS_HTTP_POST_REQUEST := true
LibNg112_Pics.PICS_SERVICE_LOST := true
LibNg112_Pics.PICS_L_FIS_GEO1 := true
#LibNg112_Pics.PICS_HTTP_POST_REQUEST := false

[LOGGING]
# In this section you can specify the name of the log file and the classes of events
@@ -41,10 +40,8 @@ LogEventTypes:= Yes
#system.httpPort.params := "HTTP(codecs=lost:lost_codec;held:held_codec)/TCP(debug=1,server=lis.gridgears.io,use_ssl=1)"
# ECRF
system.httpPort.params := "HTTP(codecs=lost:lost_codec;held:held_codec)/TCP(debug=1,server=ecrf.gridgears.io,use_ssl=1)"
# Test
#system.httpPort.params := "HTTP(codecs=lost:lost_codec;held:held_codec)/TCP(debug=1,server=ptsv2.com,port=80,use_ssl=0)"

#system.SIPP.params := "SIP/UDP(dst_ip=192.168.1.250,dst_port=5060,src_ip=192.168.1.253,src_port=5060)/ETH(mac_src=080027d2b658,mac_dst=90fd61e61902,eth_type=0800)/PCAP(mac_src=080027d2b658,nic=eth1,filter=and udp port 12345)"
# SIP
system.SIPP.params := "SIP/UDP(dst_ip=127.0.0.1,dst_port=5060,src_ip=10.10.33.253,src_port=5060)"

[DEFINE]
# In this section you can create macro definitions,
@@ -78,7 +75,7 @@ system.httpPort.params := "HTTP(codecs=lost:lost_codec;held:held_codec)/TCP(debu
#AtsNg112_TestCases.TC_LIS_HTTP_POST_BV_07
#AtsNg112_TestCases.TC_LIS_HTTP_GET_BV_01
#AtsNg112_TestCases.TC_LIS_HTTP_GET_BV_02
AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_01
#AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_01
#AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_02
#AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_03
#AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_04
@@ -91,7 +88,7 @@ AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_01
#AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_11
#AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_12
#AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_13
#AtsNg112_TestCases.control
AtsNg112_TestControl.control

[GROUPS]
# In this section you can specify groups of hosts. These groups can be used inside the
+3 −2
Original line number Diff line number Diff line
@@ -58,14 +58,15 @@ module LibNg112_Functions {
                          out ImsComponent p_psap
                          ) runs on HttpImsComponent {
        p_ecrf := HttpComponent.create alive;
        p_ue := ImsComponent.create alive;
        p_psap := ImsComponent.create alive;
        
        connect(p_ecrf:syncPort, self:syncPort);
        connect(p_psap:syncPort, self:syncPort);
        connect(p_ue:syncPort, self:syncPort);
        connect(p_psap:syncPort, self:syncPort);
        map(p_ecrf:httpPort, system:httpPort);
        map(p_psap:SIPP, system:SIPP);
        map(p_ue:SIPP, system:SIPP);
        map(p_psap:SIPP, system:SIPP);
        
      } // End of function f_cf_03_up
      
+33 −3
Original line number Diff line number Diff line
@@ -46,6 +46,9 @@ module TestCodec_Xsd {
        extension "File:../xsd/geometryBasic2d.xsd";
    }

    // LibItsHttp
    import from LibItsHttp_XmlTemplates all;
    
    // LibNg112
    import from LibNg112_TypesAndValues all;
    import from LibNg112_Templates all;
@@ -55,12 +58,25 @@ module TestCodec_Xsd {
    import from TestCodec_TestAndSystem all;
    
  testcase tc_linear_ring_1() runs on TCType system TCType {
    var universal charstring v_temp := "<LinearRing xmlns=\"http://www.opengis.net/gml\">\r\n<pos>48.13126755117026 16.245346069335938</pos>\r\n<pos>48.13126755117026 16.491851806640625</pos>\r\n<pos>48.294614813244344 16.491851806640625</pos>\r\n<pos>48.294614813244344 16.245346069335938</pos>\r\n<pos>48.13126755117026 16.245346069335938</pos>\r\n</LinearRing>\r\n"
;
    var template (omit) LinearRingType v_linear_ring_template;
    var LinearRingType v_linear_ring;
    var universal charstring v_enc;
    var integer v_result;

    v_result := decvalue_unichar(v_temp, v_linear_ring);
    v_linear_ring_template := m_linear_ring_type_pos(
                                                     {
                                                       { pos:= { 48.13126755117026, 16.245346069335938 } },
                                                       { pos:= { 48.13126755117026, 16.491851806640625 } },
                                                       { pos:= { 48.13126755117026, 16.491851806640625 } },
                                                       { pos:= { 48.13126755117026, 16.491851806640625 } },
                                                       { pos:= { 48.13126755117026, 16.491851806640625 } }
                                                     }
                                                     );
    v_enc := encvalue_unichar(valueof(v_linear_ring_template));
    log("v_enc= ", v_enc);
    setverdict(pass, "Encoded succeed");
    
    v_result := decvalue_unichar(v_enc, v_linear_ring);
    if (v_result == 0) {
      setverdict(pass);
    } else {
@@ -69,4 +85,18 @@ module TestCodec_Xsd {
    }
   } // End of testcase tc_linear_ring_1
  
  testcase tc_linear_ring_2() runs on TCType system TCType {
    var universal charstring v_temp := "<LinearRing xmlns=\"http://www.opengis.net/gml\">\r\n<pos>48.13126755117026 16.245346069335938</pos>\r\n<pos>48.13126755117026 16.491851806640625</pos>\r\n<pos>48.294614813244344 16.491851806640625</pos>\r\n<pos>48.294614813244344 16.245346069335938</pos>\r\n<pos>48.13126755117026 16.245346069335938</pos>\r\n</LinearRing>\r\n";
    var LinearRingType v_linear_ring;
    var integer v_result;

    v_result := decvalue_unichar(v_temp, v_linear_ring);
    if (v_result == 0) {
      setverdict(pass);
    } else {
      log("v_result: ", v_result);
      setverdict(fail);
    }
   } // End of testcase tc_linear_ring_2
  
} // End of module TestCodec_Xsd
+20 −4
Original line number Diff line number Diff line
@@ -751,6 +751,22 @@ module LibItsHttp_XmlTemplates {
      ring := { linearRing := p_linear_ring }
    } // End of template mw_exterior
    
    template (omit) LinearRingType m_linear_ring_type_pos(
                                                          in template (value) LinearRingType.choice.choice_list p_choice_list,
                                                          in template (omit) XSD.AnyURI p_srsName := omit,
                                                          in template (omit) NCNameList p_uomLabels := omit
                                                          ) := {
      axisLabels   := omit,
      gid          := omit,
      id           := omit,
      srsDimension := omit,
      srsName      := p_srsName,
      uomLabels    := p_uomLabels,
      choice := {
        choice_list := p_choice_list
      }
    } // End of template m_linear_ring_type_pos
    
    template (present) LinearRingType mw_linear_ring_type_pos(
                                                              template (present) XSD.AnyURI p_srsName := ?,
                                                              template (present) LinearRingType.choice.choice_list p_choice_list := ?
@@ -764,7 +780,7 @@ module LibItsHttp_XmlTemplates {
      choice := {
        choice_list := p_choice_list
      }
    } // End of template mw_exterior
    } // End of template mw_linear_ring_type_pos
    
  } // End of group open_gis
  
+37 −37

File changed.

Contains only whitespace changes.