Class: ONCCertificationG10TestKit::ResourceAccessTest
- Inherits:
-
Inferno::Test
- Object
- Inferno::Test
- ONCCertificationG10TestKit::ResourceAccessTest
- Defined in:
- lib/onc_certification_g10_test_kit/resource_access_test.rb
Direct Known Subclasses
Instance Method Summary collapse
- #request_should_succeed? ⇒ Boolean
- #resource_group ⇒ Object
- #resource_search_test ⇒ Object
- #resource_type ⇒ Object
- #search_param_value(name) ⇒ Object
- #search_params ⇒ Object
- #status_search_param_name ⇒ Object
- #status_search_param_value ⇒ Object
- #status_search_params ⇒ Object
Instance Method Details
#request_should_succeed? ⇒ Boolean
54 55 56 |
# File 'lib/onc_certification_g10_test_kit/resource_access_test.rb', line 54 def request_should_succeed? true end |
#resource_group ⇒ Object
17 18 19 |
# File 'lib/onc_certification_g10_test_kit/resource_access_test.rb', line 17 def resource_group raise StandardError, '#resource_group must be overridden' end |
#resource_search_test ⇒ Object
50 51 52 |
# File 'lib/onc_certification_g10_test_kit/resource_access_test.rb', line 50 def resource_search_test resource_group.tests.first end |
#resource_type ⇒ Object
58 59 60 |
# File 'lib/onc_certification_g10_test_kit/resource_access_test.rb', line 58 def resource_type resource_search_test.properties.resource_type end |
#search_param_value(name) ⇒ Object
28 29 30 31 32 |
# File 'lib/onc_certification_g10_test_kit/resource_access_test.rb', line 28 def search_param_value(name) return patient_id if ['patient', '_id', 'subject'].include?(name) resource_group..search_definitions[name.to_sym][:values].first end |
#search_params ⇒ Object
21 22 23 24 25 26 |
# File 'lib/onc_certification_g10_test_kit/resource_access_test.rb', line 21 def search_params @search_params ||= resource_group..searches.first[:names].each_with_object({}) do |name, params| params[name] = search_param_value(name) end end |
#status_search_param_name ⇒ Object
40 41 42 43 |
# File 'lib/onc_certification_g10_test_kit/resource_access_test.rb', line 40 def status_search_param_name @status_search_param_name ||= resource_group..search_definitions.keys.find { |key| key.to_s.include? 'status' } end |
#status_search_param_value ⇒ Object
45 46 47 48 |
# File 'lib/onc_certification_g10_test_kit/resource_access_test.rb', line 45 def status_search_param_value @status_search_param_value ||= resource_group..search_definitions[status_search_param_name][:values].first end |
#status_search_params ⇒ Object
34 35 36 37 38 |
# File 'lib/onc_certification_g10_test_kit/resource_access_test.rb', line 34 def status_search_params { "#{status_search_param_name}": search_param_value(status_search_param_name) } end |