Changeset 96 for ruby/trunk
- Timestamp:
- Jul 30, 2008, 10:13:06 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/trunk/lib/models/tests/test_reference_model.rb
r95 r96 153 153 assert_nothing_raised(Exception){@uid_based_id = OpenEHR::RM::Support::Identification::UID_Based_ID.new('rrip::0.0.3')} 154 154 assert_nothing_raised(Exception){@hier_object_id = OpenEHR::RM::Support::Identification::Hier_Object_ID.new('0.0.4')} 155 assert_nothing_raised(Exception){@locatable_ref = OpenEHR::RM::Support::Identification::Locatable_Ref.new('unknown', 'PERSON', @uid_based_id, '/data/event[at0001, standing]')} 155 156 end 156 157 … … 161 162 assert_instance_of OpenEHR::RM::Support::Identification::Terminology_ID, @terminology_id 162 163 assert_instance_of OpenEHR::RM::Support::Identification::Object_ID, @object_id 164 assert_instance_of OpenEHR::RM::Support::Identification::Generic_ID, @generic_id 163 165 assert_instance_of OpenEHR::RM::Support::Identification::UID_Based_ID, @uid_based_id 164 166 assert_instance_of OpenEHR::RM::Support::Identification::Hier_Object_ID, @hier_object_id 167 assert_instance_of OpenEHR::RM::Support::Identification::Locatable_Ref, @locatable_ref 165 168 end 166 169 … … 174 177 assert_raise(ArgumentError){@object_id = OpenEHR::RM::Support::Identification::Object_ID.new(nil)} 175 178 assert_raise(ArgumentError){@object_id = OpenEHR::RM::Support::Identification::Object_ID.new("")} 179 assert_equal @object_id, OpenEHR::RM::Support::Identification::Object_ID.new("0.0.4") 176 180 end 177 181 … … 341 345 assert !@hier_object_id.extension.empty? 342 346 end 347 348 def test_locatable_ref 349 # test constructor function 350 assert_equal 'unknown', @locatable_ref.namespace 351 assert_equal 'PARTY', @locatable_ref.type 352 assert_equal @uid_based_id, @locatable_ref.id 353 assert_equal '/data/event[at0001, standing]', @locatable_ref.path 354 assert_equal 'ehr://rrip/data/event[at0001, standing]', @locatable_ref.as_uri 355 356 357 end 343 358 end
Note:
See TracChangeset
for help on using the changeset viewer.