module ExchangeHandlerDefaults

Default values set for methods on ExchangeHandler

Public Instance Methods

convert_to_lower?() click to toggle source

@return [Boolean] Whether all xpaths will be done with XML that is converted to lower case

# File lib/soaspec/exchange_handlers/exchange_handler_defaults.rb, line 27
def convert_to_lower?
  false
end
expected_mandatory_elements() click to toggle source

Will be used in 'success_scenarios' shared examples. Set though 'mandatory_elements' method @return [Array] Array of symbols specifying element names

# File lib/soaspec/exchange_handlers/exchange_handler_defaults.rb, line 8
def expected_mandatory_elements
  []
end
expected_mandatory_json_values() click to toggle source

Change this through 'mandatory_json_values' method to specify json results that must be present in the response Will be used in 'success_scenarios' shared examples @return [Hash] Hash of 'json/path' => 'expected value' pairs

# File lib/soaspec/exchange_handlers/exchange_handler_defaults.rb, line 22
def expected_mandatory_json_values
  {}
end
expected_mandatory_xpath_values() click to toggle source

Change this through 'mandatory_xpath_values' method to specify xpath results that must be present in the response Will be used in 'success_scenarios' shared examples @return [Hash] Hash of 'xpath' => 'expected value' pairs

# File lib/soaspec/exchange_handlers/exchange_handler_defaults.rb, line 15
def expected_mandatory_xpath_values
  {}
end
request(response) click to toggle source

Request of API call. Either intended request or actual request @param [Object] response Response from calling exchange

# File lib/soaspec/exchange_handlers/exchange_handler_defaults.rb, line 38
def request(response)
  return "Request not yet sent Request option is #{@request_option}" unless response

  'Specific API handler should implement this'
end
retry_exception_limit() click to toggle source

Set this through 'retry_on_exceptions' on ExchangeHandler @return [Integer] Times to retry before raising exception. Default of 3

# File lib/soaspec/exchange_handlers/exchange_handler_defaults.rb, line 58
def retry_exception_limit
  3
end
retry_on_exceptions() click to toggle source

Set through 'retry_on_exceptions' method @return [Array] List of exceptions to retry for

# File lib/soaspec/exchange_handlers/exchange_handler_defaults.rb, line 46
def retry_on_exceptions
  []
end
retry_pause_time() click to toggle source

Set this through 'retry_on_exceptions' on ExchangeHandler @return [Integer] Time to wait before retrying each request. Default of 1

# File lib/soaspec/exchange_handlers/exchange_handler_defaults.rb, line 52
def retry_pause_time
  1
end
strip_namespaces?() click to toggle source

@return [Boolean] Whether to remove namespaces in xpath assertion automatically

# File lib/soaspec/exchange_handlers/exchange_handler_defaults.rb, line 32
def strip_namespaces?
  false
end