Changeset 292 for ruby/trunk/lib/models/tests/rm
- Timestamp:
- Sep 24, 2009, 6:47:45 PM (15 years ago)
- Location:
- ruby/trunk/lib/models/tests/rm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/trunk/lib/models/tests/rm/test_common.rb
r291 r292 86 86 class RM_Common_Archetyped_Test < Test::Unit::TestCase 87 87 def setup 88 <<<<<<< .working 89 @dv_text = OpenEHR::RM::Data_Types::Text::DV_Text.new('Test') 90 @uid_based_id = OpenEHR::RM::Support::Identification::UID_Based_ID.new('rrip::0.0.5') 91 @archetype_id = OpenEHR::RM::Support::Identification::Archetype_ID.new('openEHR-EHR-SECTION.physical_examination-prenatal.v2') 92 @template_id = OpenEHR::RM::Support::Identification::Template_ID.new('1.0.1') 93 assert_nothing_raised(Exception){@archetyped = OpenEHR::RM::Common::Archetyped::Archetyped.new(@archetype_id, '1.0.1')} 94 assert_nothing_raised(Exception){@link = OpenEHR::RM::Common::Archetyped::Link.new(OpenEHR::RM::Data_Types::Text::DV_Text.new("generic"), OpenEHR::RM::Data_Types::URI::DV_EHR_URI.new("ehr://test/"),OpenEHR::RM::Data_Types::Text::DV_Text.new("problem"))} 95 ======= 88 96 89 @dv_text = OpenEhr::RM::DataTypes::Text::DvText.new('Test') 97 90 @uid_based_id = OpenEhr::RM::Support::Identification::UidBasedId.new('rrip::0.0.5') … … 100 93 assert_nothing_raised(Exception){@archetyped = OpenEhr::RM::Common::Archetyped::Archetyped.new(@archetype_id, '1.0.1')} 101 94 assert_nothing_raised(Exception){@link = OpenEhr::RM::Common::Archetyped::Link.new(OpenEhr::RM::DataTypes::Text::DvText.new("generic"), OpenEhr::RM::DataTypes::Uri::DvEhrUri.new("ehr://test/"),OpenEhr::RM::DataTypes::Text::DvText.new("problem"))} 102 >>>>>>> .merge-right.r168103 95 assert_nothing_raised(Exception){ 104 96 @pathable = OpenEhr::RM::Common::Archetyped::Pathable.new } … … 153 145 assert_nothing_raised(Exception){@archetyped.template_id = @template_id} 154 146 assert_equal @template_id, @archetyped.template_id 155 <<<<<<< .working156 archetype_id2 = OpenEHR::RM::Support::Identification::Archetype_ID.new('openEHR-EHR-SECTION.physical_examination-prenatal.v2')157 =======158 147 archetype_id2 = OpenEhr::RM::Support::Identification::ArchetypeId.new("1.0.2", "biochemistry result_cholesterol", "entry", "ehr_rm", "openehr","cholesterol","0.0.3") 159 >>>>>>> .merge-right.r168160 148 assert_nothing_raised(ArgumentError){@archetyped.archetype_id = archetype_id2} 161 149 assert_equal archetype_id2, @archetyped.archetype_id -
ruby/trunk/lib/models/tests/rm/test_data_structure.rb
r291 r292 3 3 require 'rm' 4 4 5 <<<<<<< .working6 include OpenEHR::RM::Data_Structures7 =======8 5 include OpenEHR::RM::Data_Structures 9 6 include OpenEHR::RM::Data_Structures::Item_Structure 10 >>>>>>> .merge-right.r168 7 11 8 12 9 class RmDataStructureTest < Test::Unit::TestCase -
ruby/trunk/lib/models/tests/rm/test_support.rb
r291 r292 13 13 class RM_Support_Identification_Test < Test::Unit::TestCase 14 14 def setup 15 <<<<<<< .working16 assert_nothing_raised(Exception){@object_id = OpenEHR::RM::Support::Identification::Object_ID.new("0.0.3")}17 assert_nothing_raised(Exception){@object_ref = OpenEHR::RM::Support::Identification::Object_Ref.new('local', 'ANY', @object_id)}18 assert_nothing_raised(Exception){@archetype_id = OpenEHR::RM::Support::Identification::Archetype_ID.new('openEHR-EHR-SECTION.physical_examination-prenatal.v2')}19 assert_nothing_raised(Exception){@terminology_id = OpenEHR::RM::Support::Identification::Terminology_ID.new('ICD10(2003)')}20 assert_nothing_raised(Exception){@generic_id = OpenEHR::RM::Support::Identification::Generic_ID.new("0.0.3", "openehr")}21 assert_nothing_raised(Exception){@uid_based_id = OpenEHR::RM::Support::Identification::UID_Based_ID.new('rrip::0.0.3')}22 assert_nothing_raised(Exception){@hier_object_id = OpenEHR::RM::Support::Identification::Hier_Object_ID.new('0.0.4')}23 assert_nothing_raised(Exception){@locatable_ref = OpenEHR::RM::Support::Identification::Locatable_Ref.new('unknown', 'PERSON', @uid_based_id, 'data/event[at0001, standing]')}24 assert_nothing_raised(Exception){@party_ref = OpenEHR::RM::Support::Identification::Party_Ref.new('unknown', 'ORGANISATION', @object_id)}25 assert_nothing_raised(Exception){@access_group_ref = OpenEHR::RM::Support::Identification::Access_Group_Ref.new('unknown', 'ACCESS_GROUP', @object_id)}26 assert_nothing_raised(Exception){@version_tree_id = OpenEHR::RM::Support::Identification::Version_Tree_ID.new('1.2.3')}27 assert_nothing_raised(Exception){@object_version_id = OpenEHR::RM::Support::Identification::Object_Version_ID.new('ABC::DEF::1.2.3')}28 =======29 15 assert_nothing_raised(Exception){@object_id = OpenEhr::RM::Support::Identification::ObjectId.new("0.0.3")} 30 16 assert_nothing_raised(Exception){@object_ref = OpenEhr::RM::Support::Identification::ObjectRef.new('local', 'ANY', @object_id)} … … 39 25 assert_nothing_raised(Exception){@version_tree_id = OpenEhr::RM::Support::Identification::VersionTreeId.new('1.2.3')} 40 26 assert_nothing_raised(Exception){@object_version_id = OpenEhr::RM::Support::Identification::ObjectVersionId.new('ABC::DEF::1.2.3')} 41 >>>>>>> .merge-right.r16842 27 end 43 28 … … 100 85 101 86 def test_archetype_id 102 <<<<<<< .working103 assert_equal 'openEHR-EHR-SECTION.physical_examination-prenatal.v2', @archetype_id.value104 assert_equal 'openEHR-EHR-SECTION', @archetype_id.qualified_rm_entity105 assert_equal 'openEHR', @archetype_id.rm_originator106 assert_equal 'EHR', @archetype_id.rm_name107 assert_equal 'SECTION', @archetype_id.rm_entity108 assert_equal 'physical_examination', @archetype_id.concept_name109 assert_equal 'prenatal', @archetype_id.specialisation110 assert_equal 'v2', @archetype_id.version_id111 =======112 87 assert_equal "0.0.5", @archetype_id.value 113 88 assert_nothing_raised(Exception){@archetype_id.value = "0.0.6"} … … 166 141 assert_raise(ArgumentError){@archetype_id.version_id = nil} 167 142 assert_raise(ArgumentError){@archetype_id.version_id = ""} 168 >>>>>>> .merge-right.r168169 143 end 170 144
Note:
See TracChangeset
for help on using the changeset viewer.