Module: ExchangeHandlerDefaults
- Included in:
- Soaspec::ExchangeHandler
- Defined in:
- lib/soaspec/exchange_handlers/exchange_handler_defaults.rb
Overview
Default values set for methods on ExchangeHandler
Instance Method Summary collapse
-
#convert_to_lower? ⇒ Boolean
Whether all xpaths will be done with XML that is converted to lower case.
-
#expected_mandatory_elements ⇒ Array
Will be used in ‘success_scenarios’ shared examples.
-
#expected_mandatory_json_values ⇒ Hash
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.
-
#expected_mandatory_xpath_values ⇒ Hash
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.
-
#request(response) ⇒ Object
Request of API call.
-
#retry_exception_limit ⇒ Integer
Set this through ‘retry_on_exceptions’ on ExchangeHandler.
-
#retry_on_exceptions ⇒ Array
Set through ‘retry_on_exceptions’ method.
-
#retry_pause_time ⇒ Integer
Set this through ‘retry_on_exceptions’ on ExchangeHandler.
-
#strip_namespaces? ⇒ Boolean
Whether to remove namespaces in xpath assertion automatically.
Instance Method Details
#convert_to_lower? ⇒ Boolean
Returns Whether all xpaths will be done with XML that is converted to lower case.
27 28 29 |
# File 'lib/soaspec/exchange_handlers/exchange_handler_defaults.rb', line 27 def convert_to_lower? false end |
#expected_mandatory_elements ⇒ Array
Will be used in ‘success_scenarios’ shared examples. Set though ‘mandatory_elements’ method
8 9 10 |
# File 'lib/soaspec/exchange_handlers/exchange_handler_defaults.rb', line 8 def expected_mandatory_elements [] end |
#expected_mandatory_json_values ⇒ Hash
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
22 23 24 |
# File 'lib/soaspec/exchange_handlers/exchange_handler_defaults.rb', line 22 def expected_mandatory_json_values {} end |
#expected_mandatory_xpath_values ⇒ Hash
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
15 16 17 |
# File 'lib/soaspec/exchange_handlers/exchange_handler_defaults.rb', line 15 def expected_mandatory_xpath_values {} end |
#request(response) ⇒ Object
Request of API call. Either intended request or actual request
38 39 40 41 42 |
# 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 ⇒ Integer
Set this through ‘retry_on_exceptions’ on ExchangeHandler
58 59 60 |
# File 'lib/soaspec/exchange_handlers/exchange_handler_defaults.rb', line 58 def retry_exception_limit 3 end |
#retry_on_exceptions ⇒ Array
Set through ‘retry_on_exceptions’ method
46 47 48 |
# File 'lib/soaspec/exchange_handlers/exchange_handler_defaults.rb', line 46 def retry_on_exceptions [] end |
#retry_pause_time ⇒ Integer
Set this through ‘retry_on_exceptions’ on ExchangeHandler
52 53 54 |
# File 'lib/soaspec/exchange_handlers/exchange_handler_defaults.rb', line 52 def retry_pause_time 1 end |
#strip_namespaces? ⇒ Boolean
Returns Whether to remove namespaces in xpath assertion automatically.
32 33 34 |
# File 'lib/soaspec/exchange_handlers/exchange_handler_defaults.rb', line 32 def strip_namespaces? false end |