Class: Crucible::Tests::ConnectathonPatientTrackTest
Constant Summary
Constants inherited from BaseSuite
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, #warnings
Instance Method Summary collapse
- #check_sort_order(entries) ⇒ Object
- #description ⇒ Object
- #id ⇒ Object
-
#initialize(client1, client2 = nil) ⇒ ConnectathonPatientTrackTest
constructor
A new instance of ConnectathonPatientTrackTest.
- #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, #ignore_client_exception, #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_conflict, #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) ⇒ ConnectathonPatientTrackTest
Returns a new instance of ConnectathonPatientTrackTest.
13 14 15 16 17 |
# File 'lib/tests/suites/connectathon_patient_track.rb', line 13 def initialize(client1, client2=nil) super(client1, client2) @tags.append('connectathon') @category = {id: 'connectathon', title: 'Connectathon'} end |
Instance Method Details
#check_sort_order(entries) ⇒ Object
299 300 301 302 303 304 305 306 307 308 309 310 311 312 |
# File 'lib/tests/suites/connectathon_patient_track.rb', line 299 def check_sort_order(entries) entries.each_cons(2) do |left, right| assert !left.resource..nil?, 'Unable to determine if entries are in the correct order -- no meta' assert !right.resource..nil?, 'Unable to determine if entries are in the correct order -- no meta' if !left.resource..versionId.nil? && !right.resource..versionId.nil? assert (left.resource..versionId > right.resource..versionId), 'Result contains entries in the wrong order.' elsif !left.resource..lastUpdated.nil? && !right.resource..lastUpdated.nil? assert (left.resource..lastUpdated >= right.resource..lastUpdated), 'Result contains entries in the wrong order.' else raise AssertionException.new 'Unable to determine if entries are in the correct order -- no meta.versionId or meta.lastUpdated' end end end |
#description ⇒ Object
9 10 11 |
# File 'lib/tests/suites/connectathon_patient_track.rb', line 9 def description 'Connectathon Patient Track tests: registering, updating, history, and search' end |
#id ⇒ Object
5 6 7 |
# File 'lib/tests/suites/connectathon_patient_track.rb', line 5 def id 'Connectathon Patient Track' end |
#setup ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/tests/suites/connectathon_patient_track.rb', line 19 def setup @resources = Crucible::Generator::Resources.new @patient = @resources.example_patient @patient.id = nil # clear the identifier, in case the server checks for duplicates @patient.identifier = nil # clear the identifier, in case the server checks for duplicates @patient_us = @resources.example_patient_us @patient_us.id = nil # clear the identifier, in case the server checks for duplicates @patient_us.identifier = nil # clear the identifier, in case the server checks for duplicates end |