Index: ruby/trunk/models/tests/test_reference_model.rb
===================================================================
--- ruby/trunk/models/tests/test_reference_model.rb	(revision 4)
+++ ruby/trunk/models/tests/test_reference_model.rb	(revision 26)
@@ -5,6 +5,8 @@
 class ReferenceModelTest < Test::Unit::TestCase
   def setup
-    @authored_resource = OpenEHR::RM::Common::Resource::Authored_Resource.new("ja","en","test")
-    @translation_details = OpenEHR::RM::Common::Resource::Translation_Details.new(nil,nil,nil,nil,nil)
+    @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)
 #    @openehr_definitions = OpenEHR::RM::Support::Definition::OpenEHR_Definitions.new
     @dv_boolean = OpenEHR::RM::Data_Types::Basic::DV_Boolean.new("TRUE")
@@ -19,6 +21,6 @@
   
   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::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
@@ -29,4 +31,5 @@
     assert_instance_of OpenEHR::RM::Data_Types::Text::DV_Coded_Text, @dv_coded_text
   end
+
   def test_constant
     assert_equal("\r", OpenEHR::RM::Support::Definition::OpenEHR_Definitions::CR)
@@ -35,4 +38,5 @@
     assert_equal("\n", OpenEHR::RM::Data_Types::Basic::Data_Value::LF)
   end
+
   def test_dv_boolean
     assert @dv_boolean.value?
@@ -43,4 +47,5 @@
     assert_raise(ArgumentError){OpenEHR::RM::Data_Types::Basic::DV_Boolean.new(nil)}
   end
+
   def test_dv_state
     assert_equal("code1", @dv_state.value)
@@ -52,4 +57,5 @@
     assert_raise(ArgumentError) {OpenEHR::RM::Data_Types::Basic::DV_State.new(nil,nil)}
   end
+
   def test_dv_identifier
     assert_equal("Ruby Hospital", @dv_identifier.assigner)
@@ -67,4 +73,5 @@
     assert_raise(ArgumentError) {OpenEHR::RM::Data_Types::Basic::DV_Identifier.new(nil, nil, nil, nil)}
   end
+
   def test_dv_uri
     assert_equal("file0", @dv_uri.fragment_id)
@@ -77,4 +84,5 @@
     assert_equal("/openehr-jp/", @dv_uri.path)
   end
+
   def test_dv_ehr_uri
     assert_equal("ehr", @dv_ehr_uri.scheme)
@@ -82,36 +90,29 @@
       @dv_ehr_uri.value="svn://www.openehr.jp/openehr-jp/" }
   end
+
   def test_dv_text
     assert_equal("valid value", @dv_text.value)
-    assert_raise(ArgumentError){
-      @dv_text.value = "not valid value\n"}
-    assert_raise(ArgumentError){
-      @dv_text.value = nil }
-    assert_raise(ArgumentError){
-      @dv_text.value = "" }
-    assert_raise(ArgumentError){
-      @dv_text.formatting = "" }
-    assert_raise(ArgumentError){
-      @dv_text.encoding = ""}
-    assert_raise(ArgumentError){
-      @dv_text.language = ""}
-    assert_raise(ArgumentError){
-      @dv_text.mappings = Set.new}
-    assert_raise(ArgumentError){
-      @dv_text.mappings = ""}
-    assert_raise(ArgumentError){
-      @dv_text.language = ""}
+    assert_raise(ArgumentError){@dv_text.value = "not valid value\n"}
+    assert_raise(ArgumentError){@dv_text.value = nil }
+    assert_raise(ArgumentError){@dv_text.value = "" }
+    assert_raise(ArgumentError){@dv_text.formatting = "" }
+    assert_raise(ArgumentError){@dv_text.encoding = ""}
+    assert_raise(ArgumentError){@dv_text.language = ""}
+    assert_raise(ArgumentError){@dv_text.mappings = Set.new}
+    assert_raise(ArgumentError){@dv_text.mappings = ""}
+    assert_raise(ArgumentError){@dv_text.language = ""}
   end
+
   def test_dv_coded_text
     assert_equal("valid value", @dv_coded_text.value)
     assert_equal("AT1000", @dv_coded_text.defining_code)
-    assert_raise(ArgumentError){
-      @dv_coded_text.defining_code=nil}
+    assert_raise(ArgumentError){@dv_coded_text.defining_code=nil}
   end
+
   def test_dv_paragraph
     assert_equal((Set.new ["test1", "test2"]), @dv_paragraph.items)
-    assert_raise(ArgumentError){
-      @dv_paragraph.items=Set.new}
+    assert_raise(ArgumentError){@dv_paragraph.items=Set.new}
   end
+
   def test_terminology_mapping
     
@@ -119,2 +120,17 @@
 end
 
+
+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
+  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
+
+  end
+end
