Index: ruby/trunk/tests/models/test_reference_model.rb
===================================================================
--- ruby/trunk/tests/models/test_reference_model.rb	(revision 64)
+++ ruby/trunk/tests/models/test_reference_model.rb	(revision 291)
@@ -5,36 +5,36 @@
 class ReferenceModelTest < Test::Unit::TestCase
   def setup
-    @authored_resource = OpenEHR::RM::Common::Resource::AUTHORED_RESOURCE.new(:original_language => "ja",
+    @authored_resource = OpenEhr::RM::Common::Resource::AUTHORED_RESOURCE.new(:original_language => "ja",
                                                                               :translations => "en",
                                                                               :description => "test")
-    @translation_details = OpenEHR::RM::Common::Resource::TRANSLATION_DETAILS.new(nil,nil,nil,nil,nil)
+    @translation_details = OpenEhr::RM::Common::Resource::TRANSLATION_DETAILS.new(nil,nil,nil,nil,nil)
 #    @openehr_definitions = OpenEHR::RM::Support::Definition::OpenEHR_Definitions.new
-    @dv_boolean = OpenEHR::RM::Data_Types::Basic::DV_Boolean.new("TRUE")
-    @dv_state = OpenEHR::RM::Data_Types::Basic::DV_State.new("code1",true)
-    @dv_identifier = OpenEHR::RM::Data_Types::Basic::DV_Identifier.new("Ruby Hospital","0123456-0", "Information office", "personal id")
-    @dv_uri = OpenEHR::RM::Data_Types::URI::DV_URI.new("http://www.openehr.jp/changeset/test?cmd=93#file0")
-    @dv_ehr_uri = OpenEHR::RM::Data_Types::URI::DV_EHR_URI.new("ehr://1234567/87284370-2D4B-4e3d-A3F3-F303D2F4F34B@2005-08-02T04:30:00")
-    @dv_text = OpenEHR::RM::Data_Types::Text::DV_Text.new("valid value")
-    @dv_coded_text = OpenEHR::RM::Data_Types::Text::DV_Coded_Text.new("valid value", "AT1000")
-    @dv_paragraph = OpenEHR::RM::Data_Types::Text::DV_Paragraph.new(Set.new(["test1", "test2"]))
+    @dv_boolean = OpenEhr::RM::DataTypes::Basic::DvBoolean.new("TRUE")
+    @dv_state = OpenEhr::RM::DataTypes::Basic::DvState.new("code1",true)
+    @dv_identifier = OpenEhr::RM::DataTypes::Basic::DvIdentifier.new("Ruby Hospital","0123456-0", "Information office", "personal id")
+    @dv_uri = OpenEhr::RM::DataTypes::Uri::DvUri.new("http://www.openehr.jp/changeset/test?cmd=93#file0")
+    @dv_ehr_uri = OpenEhr::RM::DataTypes::Uri::DvEhrUri.new("ehr://1234567/87284370-2D4B-4e3d-A3F3-F303D2F4F34B@2005-08-02T04:30:00")
+    @dv_text = OpenEhr::RM::DataTypes::Text::DvText.new("valid value")
+    @dv_coded_text = OpenEhr::RM::DataTypes::Text::DvCodedText.new("valid value", "AT1000")
+    @dv_paragraph = OpenEhr::RM::DataTypes::Text::DvParagraph.new(Set.new(["test1", "test2"]))
   end
   
   def test_init
-    assert_instance_of OpenEHR::RM::Common::Resource::AUTHORED_RESOURCE, @authored_resource
-    assert_instance_of OpenEHR::RM::Common::Resource::TRANSLATION_DETAILS, @translation_details
-    assert_instance_of OpenEHR::RM::Data_Types::Basic::DV_Boolean, @dv_boolean
-    assert_instance_of OpenEHR::RM::Data_Types::Basic::DV_State, @dv_state
-    assert_instance_of OpenEHR::RM::Data_Types::Basic::DV_Identifier, @dv_identifier
-    assert_instance_of OpenEHR::RM::Data_Types::URI::DV_URI, @dv_uri
-    assert_instance_of OpenEHR::RM::Data_Types::URI::DV_EHR_URI, @dv_ehr_uri
-    assert_instance_of OpenEHR::RM::Data_Types::Text::DV_Text, @dv_text
-    assert_instance_of OpenEHR::RM::Data_Types::Text::DV_Coded_Text, @dv_coded_text
+    assert_instance_of OpenEhr::RM::Common::Resource::AUTHORED_RESOURCE, @authored_resource
+    assert_instance_of OpenEhr::RM::Common::Resource::TRANSLATION_DETAILS, @translation_details
+    assert_instance_of OpenEhr::RM::DataTypes::Basic::DvBoolean, @dv_boolean
+    assert_instance_of OpenEhr::RM::DataTypes::Basic::DvState, @dv_state
+    assert_instance_of OpenEhr::RM::DataTypes::Basic::DvIdentifier, @dv_identifier
+    assert_instance_of OpenEhr::RM::DataTypes::Uri::DvUri, @dv_uri
+    assert_instance_of OpenEhr::RM::DataTypes::Uri::DvEhrUri, @dv_ehr_uri
+    assert_instance_of OpenEhr::RM::DataTypes::Text::DvText, @dv_text
+    assert_instance_of OpenEhr::RM::DataTypes::Text::DvCodedText, @dv_coded_text
   end
 
   def test_constant
-    assert_equal("\r", OpenEHR::RM::Support::Definition::OpenEHR_Definitions::CR)
-    assert_equal("\n", OpenEHR::RM::Support::Definition::OpenEHR_Definitions::LF)
-    assert_equal("\r", OpenEHR::RM::Data_Types::Basic::Data_Value::CR)
-    assert_equal("\n", OpenEHR::RM::Data_Types::Basic::Data_Value::LF)
+    assert_equal("\r", OpenEhr::RM::Support::Definition::OpenEHRDefinitions::CR)
+    assert_equal("\n", OpenEhr::RM::Support::Definition::OpenEHRDefinitions::LF)
+    assert_equal("\r", OpenEhr::RM::DataTypes::Basic::DataValue::CR)
+    assert_equal("\n", OpenEhr::RM::DataTypes::Basic::DataValue::LF)
   end
 
@@ -45,5 +45,5 @@
     # Constraints Value_exists
     assert_raise(ArgumentError){@dv_boolean.value=nil}
-    assert_raise(ArgumentError){OpenEHR::RM::Data_Types::Basic::DV_Boolean.new(nil)}
+    assert_raise(ArgumentError){OpenEhr::RM::DataTypes::Basic::DvBoolean.new(nil)}
   end
 
@@ -55,5 +55,5 @@
     @dv_state.terminal = false
     assert !@dv_state.is_terminal?
-    assert_raise(ArgumentError) {OpenEHR::RM::Data_Types::Basic::DV_State.new(nil,nil)}
+    assert_raise(ArgumentError) {OpenEhr::RM::DataTypes::Basic::DvState.new(nil,nil)}
   end
 
@@ -71,5 +71,5 @@
     @dv_identifier.type = "test id"
     assert_equal("test id", @dv_identifier.type)
-    assert_raise(ArgumentError) {OpenEHR::RM::Data_Types::Basic::DV_Identifier.new(nil, nil, nil, nil)}
+    assert_raise(ArgumentError) {OpenEhr::RM::DataTypes::Basic::DvIdentifier.new(nil, nil, nil, nil)}
   end
 
@@ -123,13 +123,13 @@
 class ReferenceModelSupportIdentificationTest < Test::Unit::TestCase
   def setup
-    @object_id = OpenEHR::RM::Support::Identification::OBJECT_ID.new
-    @terminology_id = OpenEHR::RM::Support::Identification::TERMINOLOGY_ID.new('terminology','version')
-    @archetype_id = OpenEHR::RM::Support::Identification::ARCHETYPE_ID.new
+    @object_id = OpenEhr::RM::Support::Identification::OBJECT_ID.new
+    @terminology_id = OpenEhr::RM::Support::Identification::TERMINOLOGY_ID.new('terminology','version')
+    @archetype_id = OpenEhr::RM::Support::Identification::ARCHETYPE_ID.new
   end
   
   def test_init
-    assert_instance_of OpenEHR::RM::Support::Identification::OBJECT_ID, @object_id
-    assert_instance_of OpenEHR::RM::Support::Identification::TERMINOLOGY_ID, @terminology_id
-    assert_instance_of OpenEHR::RM::Support::Identification::ARCHETYPE_ID, @archetype_id
+    assert_instance_of OpenEhr::RM::Support::Identification::OBJECT_ID, @object_id
+    assert_instance_of OpenEhr::RM::Support::Identification::TERMINOLOGY_ID, @terminology_id
+    assert_instance_of OpenEhr::RM::Support::Identification::ARCHETYPE_ID, @archetype_id
 
   end
