Class: IpaTestKit::SearchTestProperties

Inherits:
Object
  • Object
show all
Defined in:
lib/ipa_test_kit/search_test_properties.rb

Constant Summary collapse

ATTRIBUTES =
[
  :resource_type,
  :search_param_names,
  :first_search,
  :fixed_value_search,
  :saves_delayed_references,
  :test_medication_inclusion,
  :token_search_params,
  :test_reference_variants,
  :params_with_comparators,
  :multiple_or_search_params,
  :test_post_search
].freeze

Instance Method Summary collapse

Constructor Details

#initialize(**properties) ⇒ SearchTestProperties

Returns a new instance of SearchTestProperties.



19
20
21
22
23
24
25
# File 'lib/ipa_test_kit/search_test_properties.rb', line 19

def initialize(**properties)
  properties.each do |key, value|
    raise StandardError, "Unkown search test property: #{key}" unless ATTRIBUTES.include?(key)

    instance_variable_set(:"@#{key}", value)
  end
end

Instance Method Details

#first_search?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/ipa_test_kit/search_test_properties.rb', line 27

def first_search?
  !!first_search
end

#fixed_value_search?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/ipa_test_kit/search_test_properties.rb', line 31

def fixed_value_search?
  !!fixed_value_search
end

#saves_delayed_references?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/ipa_test_kit/search_test_properties.rb', line 35

def saves_delayed_references?
  !!saves_delayed_references
end

#test_medication_inclusion?Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/ipa_test_kit/search_test_properties.rb', line 39

def test_medication_inclusion?
  !!test_medication_inclusion
end

#test_post_search?Boolean

Returns:

  • (Boolean)


47
48
49
# File 'lib/ipa_test_kit/search_test_properties.rb', line 47

def test_post_search?
  !!test_post_search
end

#test_reference_variants?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/ipa_test_kit/search_test_properties.rb', line 43

def test_reference_variants?
  !!test_reference_variants
end