class Crucible::Tests::ConnectathonProfileValidationTrackTest
Public Class Methods
new(client1, client2=nil)
click to toggle source
Calls superclass method
Crucible::Tests::BaseTest::new
# File lib/tests/suites/connectathon_profile_validation.rb, line 13 def initialize(client1, client2=nil) super(client1, client2) @tags.append('connectathon') @category = {id: 'connectathon', title: 'Connectathon'} end
Public Instance Methods
description()
click to toggle source
# 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()
click to toggle source
# File lib/tests/suites/connectathon_profile_validation.rb, line 5 def id 'ConnectathonProfileValidationTrackTest' end
setup()
click to toggle source
# File lib/tests/suites/connectathon_profile_validation.rb, line 19 def setup @resources = Crucible::Generator::Resources.new @profile = @resources.track3_profile @profile.id = nil @profile.identifier = nil # clear the identifiers, in case the server checks for duplicates reply = @client.create @profile @profile.id = reply.id if !reply.id.nil? options = { id: @profile.id, resource: @profile.class, format: nil } @profile_url = @client.full_resource_url(options) @profile_url = reply.self_link if !reply.self_link.nil? @obs = @resources.track3_observations @obs.each do |x| x.id = nil x.identifier = nil # clear the identifiers, in case the server checks for duplicates x.meta = nil end end
teardown()
click to toggle source
# File lib/tests/suites/connectathon_profile_validation.rb, line 44 def teardown @client.destroy(FHIR::StructureDefinition, @profile.id) if !@profile.id.nil? # @obs.each do |x| # @client.destroy(FHIR::Observation, x.id) if !x.id.nil? # end end