Class: Crucible::Tests::DataAccessFrameworkProfilesTest
Constant Summary
Constants inherited from BaseTest
BaseTest::BASE_SPEC_LINK, BaseTest::JSON_FIELDS, BaseTest::METADATA_FIELDS, BaseTest::REST_SPEC_LINK, BaseTest::STATUS
Instance Attribute Summary
Attributes inherited from BaseTest
#category, #tags, #tests_subset
Instance Method Summary collapse
- #description ⇒ Object
- #id ⇒ Object
-
#initialize(client1, client2 = nil) ⇒ DataAccessFrameworkProfilesTest
constructor
A new instance of DataAccessFrameworkProfilesTest.
- #setup ⇒ Object
- #teardown ⇒ Object
Methods inherited from BaseSuite
#build_messages, #collect_metadata, #fhir_resources, #links, #metadata, #parse_operation_outcome, #requires, #resource_category, test, #title, #validates
Methods inherited from BaseTest
#author, #details, #execute, #execute_test_method, #execute_test_methods, #multiserver, #requires_authorization, #tests, #warning
Methods included from Assertions
#assert, #assert_bundle_entry_count, #assert_bundle_response, #assert_bundle_transactions_okay, #assert_equal, #assert_etag_present, #assert_last_modified_present, #assert_minimum, #assert_navigation_links, #assert_operator, #assert_resource_content_type, #assert_resource_type, #assert_response_bad, #assert_response_code, #assert_response_created, #assert_response_gone, #assert_response_not_found, #assert_response_ok, #assert_valid_content_location_present, #assert_valid_profile, #assert_valid_resource_content_type_present, #assertion_negated, #skip
Constructor Details
#initialize(client1, client2 = nil) ⇒ DataAccessFrameworkProfilesTest
Returns a new instance of DataAccessFrameworkProfilesTest.
13 14 15 16 17 |
# File 'lib/tests/suites/daf_profiles_test.rb', line 13 def initialize(client1, client2=nil) super(client1, client2) .append('argonaut') @category = {id: 'core_functionality', title: 'Core Functionality'} end |
Instance Method Details
#description ⇒ Object
9 10 11 |
# File 'lib/tests/suites/daf_profiles_test.rb', line 9 def description 'Test support for the U.S. Data Access Framework (DAF) Implementation Guide' end |
#id ⇒ Object
5 6 7 |
# File 'lib/tests/suites/daf_profiles_test.rb', line 5 def id 'DataAccessFrameworkProfilesTest' end |
#setup ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/tests/suites/daf_profiles_test.rb', line 19 def setup @server_side_resources = {} @resources = Crucible::Generator::Resources.new @daf_conformance = @resources.daf_conformance # Try to create a DAF patient on the server. # This will facilitate SEARCH testing, if it succeeds. # Do not assert that the creation worked, because CREATE is *not* # required by DAF. This is a read-only test. @daf_patient = Crucible::Tests::DAFResourceGenerator.daf_patient reply = @client.create(@daf_patient) @daf_patient.xmlId = reply.id if !reply.id.nil? # assert_response_created(reply) end |
#teardown ⇒ Object
34 35 36 37 |
# File 'lib/tests/suites/daf_profiles_test.rb', line 34 def teardown # delete resources @client.destroy(FHIR::Patient, @daf_patient.xmlId) if @daf_patient && !@daf_patient.xmlId.nil? end |