Class: Crucible::Tests::ConnectathonProfileValidationTrackTest
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) ⇒ ConnectathonProfileValidationTrackTest
constructor
A new instance of ConnectathonProfileValidationTrackTest.
- #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) ⇒ ConnectathonProfileValidationTrackTest
Returns a new instance of ConnectathonProfileValidationTrackTest.
13 14 15 16 |
# File 'lib/tests/suites/connectathon_profile_validation.rb', line 13 def initialize(client1, client2=nil) super(client1, client2) @category = {id: 'connectathon', title: 'Connectathon'} end |
Instance Method Details
#description ⇒ Object
9 10 11 |
# File 'lib/tests/suites/connectathon_profile_validation.rb', line 9 def description 'Connectathon Profile Validation Track Test focuses on validating observations against the general specification and a profile.' end |
#id ⇒ Object
5 6 7 |
# File 'lib/tests/suites/connectathon_profile_validation.rb', line 5 def id 'ConnectathonProfileValidationTrackTest' end |
#setup ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/tests/suites/connectathon_profile_validation.rb', line 18 def setup @resources = Crucible::Generator::Resources.new @profile = @resources.track3_profile @profile.xmlId = nil @profile.identifier = nil # clear the identifiers, in case the server checks for duplicates reply = @client.create @profile @profile.xmlId = reply.id if !reply.id.nil? = { id: @profile.xmlId, resource: @profile.class, format: nil } @profile_url = @client.full_resource_url() @profile_url = reply.self_link if !reply.self_link.nil? @obs = @resources.track3_observations @obs.each do |x| x.xmlId = nil x.identifier = nil # clear the identifiers, in case the server checks for duplicates x. = nil end end |
#teardown ⇒ Object
43 44 45 46 47 48 |
# File 'lib/tests/suites/connectathon_profile_validation.rb', line 43 def teardown @client.destroy(FHIR::StructureDefinition, @profile.xmlId) if !@profile.xmlId.nil? # @obs.each do |x| # @client.destroy(FHIR::Observation, x.xmlId) if !x.xmlId.nil? # end end |