Changeset 95


Ignore:
Timestamp:
Jul 30, 2008, 2:01:17 AM (16 years ago)
Author:
KOBAYASHI, Shinji
Message:

refs #39
fixed Hier_Object_ID

Location:
ruby/trunk/lib/models
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ruby/trunk/lib/models/rm/support/identification.rb

    r94 r95  
    147147          end
    148148        end
     149
     150        class Hier_Object_ID < UID_Based_ID
     151
     152        end
     153
    149154      end # of Identification
    150155    end # of Support
  • ruby/trunk/lib/models/tests/test_reference_model.rb

    r94 r95  
    152152    assert_nothing_raised(Exception){@generic_id = OpenEHR::RM::Support::Identification::Generic_ID.new("0.0.3", "openehr")}
    153153    assert_nothing_raised(Exception){@uid_based_id = OpenEHR::RM::Support::Identification::UID_Based_ID.new('rrip::0.0.3')}
     154    assert_nothing_raised(Exception){@hier_object_id = OpenEHR::RM::Support::Identification::Hier_Object_ID.new('0.0.4')}
    154155  end
    155156 
     
    161162    assert_instance_of OpenEHR::RM::Support::Identification::Object_ID, @object_id
    162163    assert_instance_of OpenEHR::RM::Support::Identification::UID_Based_ID, @uid_based_id
     164    assert_instance_of OpenEHR::RM::Support::Identification::Hier_Object_ID, @hier_object_id
    163165  end
    164166
     
    310312    assert_equal "cen", @generic_id.scheme
    311313  end
     314
    312315  def test_uid_based_id
    313316    assert_equal "rrip::0.0.3", @uid_based_id.value
     
    326329    assert_equal '', @uid_based_id.extension
    327330  end
     331
     332  def test_hier_object_id
     333    assert_equal '0.0.4', @hier_object_id.value
     334    assert !@hier_object_id.root.nil?
     335    assert !@hier_object_id.has_extension?
     336# in the specification 1.0.1 has_extension? xor extention != Void void is not nil?
     337    assert @hier_object_id.extension.empty?
     338    assert_nothing_raised(Exception){@hier_object_id.value = "ehr::test"}
     339    assert !@hier_object_id.root.nil?
     340    assert @hier_object_id.has_extension?
     341    assert !@hier_object_id.extension.empty?
     342  end
    328343end
Note: See TracChangeset for help on using the changeset viewer.