Commit 00421dc9 authored by Michael Proestler's avatar Michael Proestler
Browse files

lis refactoring

parent 3d239a6d
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -13,6 +13,29 @@ module AtsLIS_Functions {

	import from urn_ietf_params_xml_ns_geopriv_held all;

  type record Pics {
    record of boolean values,
    record of charstring names
  };

  function f_check_pics(Pics pics) {
    var charstring v_msg := "";
    for(var integer v_i := 0; v_i < sizeof(pics.values); v_i := v_i + 1) {
      if (not(pics.values[v_i])) {
        if (lengthof(v_msg) > 0) {
          v_msg := v_msg & ", ";
        }
        v_msg := v_msg & pics.names[v_i];
      }
    }
    
    if (lengthof(v_msg) > 0) {
      log("*** " & testcasename() & ": " & v_msg &" required for executing the TC ***")
      setverdict(inconc);
      stop;
    }
  }

	function f_sendRequest(template (value) LocationRequest request) runs on HttpComponent {
      var boolean c_debug := true;

+23 −45
Original line number Diff line number Diff line
@@ -105,12 +105,6 @@ module AtsLIS_TestCases {
  
  group HELD {
          
    type record Pics {
      record of boolean values,
      record of charstring names
    };
    
    
    template LocationResponseType mw_location_response := {
      locationUriSet := ?,
      presence := {
@@ -155,23 +149,7 @@ module AtsLIS_TestCases {
    ) := mw_http_response(mw_http_response_ok(mw_http_message_body_xml(mw_body_xml_location_response(p_location_response))))
    
    
    function f_check_pics(Pics pics) {
      var charstring v_msg := "";
      for(var integer v_i := 0; v_i < sizeof(pics.values); v_i := v_i + 1) {
        if (not(pics.values[v_i])) {
          if (lengthof(v_msg) > 0) {
            v_msg := v_msg & ", ";
          }
          v_msg := v_msg & pics.names[v_i];
        }
      }

      if (lengthof(v_msg) > 0) {
        log("*** " & testcasename() & ": " & v_msg &" required for executing the TC ***")
        setverdict(inconc);
        stop;
      }
    }
    
    /**
     * @desc "IUT successfully responds with a Point when it receives a HTTP POST location request without location type"