Index: ruby/trunk/models/Rakefile
===================================================================
--- ruby/trunk/models/Rakefile	(revision 21)
+++ ruby/trunk/models/Rakefile	(revision 23)
@@ -48,5 +48,5 @@
 #  s.require_paths += [".","am","rm"]
   s.require_path = "."
-#  s.has_rdoc = true
+  s.has_rdoc = true
 #  s.extra_rdoc_files = ["README"]
 end
Index: ruby/trunk/models/am.rb
===================================================================
--- ruby/trunk/models/am.rb	(revision 21)
+++ ruby/trunk/models/am.rb	(revision 23)
@@ -27,8 +27,30 @@
       module Constraint_Model
         autoload :ARCHETYPE_CONSTRAINT, "am/archetype/constraint_model/archetype_constraint.rb"
-        autoload :Assertion, "am/archetype/constraint_model/assertion.rb"
         autoload :Primitive, "am/archetype/constraint_model/primitive.rb"
       end #end of ConstraintModel
+
+      module Assertion
+        autoload :ASSERTION, "am/archetype/constraint_model/assertion.rb"
+      end
+
     end # of Archetype
+
+    module OpenEHR_Profile
+      module Data_Types
+        module Basic
+          autoload :C_DV_STATE, "am/openehr_profile/data_types/basic.rb"
+        end
+
+        module Text
+          autoload :C_CODE_PHASE, "am/openehr_profile/data_types/text.rb"
+        end
+
+        module Quantity
+          autoload :C_DV_QUANTITY, "am/openehr_profile/data_types/quantity.rb"
+          autoload :C_DV_ORDINAL, "am/openehr_profile/data_types/quantity.rb"
+          autoload :C_QUANTITY_ITEM, "am/openehr_profile/data_types/quantity.rb"
+        end
+      end
+    end
   end # of AM
 end # of OpenEHR
Index: ruby/trunk/models/am/archetype/archetype.rb
===================================================================
--- ruby/trunk/models/am/archetype/archetype.rb	(revision 21)
+++ ruby/trunk/models/am/archetype/archetype.rb	(revision 23)
@@ -77,8 +77,13 @@
         def version
         end
-      end
+      end # end of ARCHETYPE
       # original file:
       # ref_imple_eiffel/components/adl_parser/src/interface/adl_definition.e
-    end # end of Archetype
+
+      class VALIDITY_KIND
+      end
+    end
+
+
   end # end of AM
 end # end of OpenEHR
Index: ruby/trunk/models/am/archetype/archetype_description/archetype_description.rb
===================================================================
--- ruby/trunk/models/am/archetype/archetype_description/archetype_description.rb	(revision 21)
+++ ruby/trunk/models/am/archetype/archetype_description/archetype_description.rb	(revision 23)
@@ -11,5 +11,5 @@
         end
 
-        class Archetype_Description_Item
+        class ARCHETYPE_DESCRIPTION_ITEM
           attr_accessor :archetype_package_uri, :lifecycle_state, :original_author, :other_contributors, :other_details
         end
Index: ruby/trunk/models/am/archetype/constraint_model/archetype_constraint.rb
===================================================================
--- ruby/trunk/models/am/archetype/constraint_model/archetype_constraint.rb	(revision 21)
+++ ruby/trunk/models/am/archetype/constraint_model/archetype_constraint.rb	(revision 23)
@@ -8,18 +8,45 @@
         end
 
-        class C_OBJECT < ARCHETYPE_CONSTRAINT
+        class CARDINALITY
           
         end
 
+        class C_OBJECT < ARCHETYPE_CONSTRAINT
+          attr_accessor :node_id, :occurrences, :rm_type_name
+
+          def initialize(args = { })
+            @node_id = args[:node_id] if args[:node_id]
+            @occurrences = args[:occurrences] if args[:occurrences]
+            @rm_type_name = args[:rm_type_name] if args[:rm_type_name]
+          end
+        end
+
         class C_ATTRIBUTE < ARCHETYPE_CONSTRAINT
-          
+          attr_accessor :rm_attribute_name, :existence, :children
+
+          def initialize(args = { })
+            @rm_attribute_name = args[:rm_attribute_name] if args[:rm_attribute_name]
+            @existence = args[:existence] if args[:existence]
+            @children = args[:children] ? args[:children] : []
+            
+          end
         end
 
         class C_DEFINED_OBJECT < C_OBJECT
+          attr_accessor :assumed_value
           
+          def initialize(args = { })
+            @assumed_value = args[:assumed_value] if args[:assumed_value]
+            super
+          end
         end
 
         class C_PRIMITIVE_OBJECT < C_DEFINED_OBJECT
+          attr_accessor :item
           
+          def initialize(args = { })
+            @attributes = args[:item] if args[:item]
+            super
+          end
         end
 
@@ -27,4 +54,16 @@
           attr_accessor :attributes, :attributes_valid
           
+          def initialize(args = { })
+            @attributes = args[:attributes] ? args[:attributes] : []
+            super
+          end
+
+          def self.create(args = { }, &block)
+            c_complex_object = new(args)
+            if block_given?
+              yield c_complex_object
+            end
+            return c_complex_object
+          end
         end
 
@@ -49,4 +88,22 @@
         end
 
+        class C_SINGLE_ATTRIBUTE < C_ATTRIBUTE
+          attr_accessor :alternatives
+
+          def initialize(args = { })
+            @alternatives = args[:alternatives] ? args[:alternatives] : []
+            super
+          end
+        end
+
+        class C_MULTIPLE_ATTRIBUTE < C_ATTRIBUTE
+          attr_accessor :members, :cardinality
+          
+          def initialize(args = { })
+            @members = args[:members] ? args[:members] : []
+            @cardinality = args[:cardinality] if args[:cardinality]
+            super
+          end
+        end
       end
     end
Index: ruby/trunk/models/am/archetype/constraint_model/assertion.rb
===================================================================
--- ruby/trunk/models/am/archetype/constraint_model/assertion.rb	(revision 21)
+++ ruby/trunk/models/am/archetype/constraint_model/assertion.rb	(revision 23)
@@ -2,8 +2,27 @@
   module AM
     module Archetype
-      module Constraint_Model
-        module Assertion
-          class Assertion
-          end
+      module Assertion
+        class ASSERTION
+        end
+
+        class ASSERTION_VARIABLE
+        end
+
+        class OPERATOR_KIND
+        end
+
+        class EXPR_ITEM
+        end
+
+        class EXPR_LEAF < EXPR_ITEM
+        end
+
+        class EXPR_OPERATOR < EXPR_ITEM
+        end
+
+        class EXPR_UNARY_OPERATOR < EXPR_OPERATOR
+        end
+
+        class EXPR_BINARY_OPERATOR < EXPR_OPERATOR
         end
       end
Index: ruby/trunk/models/am/archetype/constraint_model/primitive.rb
===================================================================
--- ruby/trunk/models/am/archetype/constraint_model/primitive.rb	(revision 21)
+++ ruby/trunk/models/am/archetype/constraint_model/primitive.rb	(revision 23)
@@ -6,5 +6,5 @@
         module Primitive
 
-          class C_Primitive
+          class C_PRIMITIVE
             def assumed_value
               raise NotImplementedError, "assumed_value should be implemented"
@@ -21,30 +21,29 @@
           end
 
-          class C_Boolean < C_Primitive
-            attr_accessor :assumed_value
-            def initialize(true_valid, false_valid, assumed_value)
-              binary_consistency(true_valid, false_valid)
-              @true_valid = true_valid
-              @false_valid = false_valid
-              @assumed_value = assumed_value
+          class C_BOOLEAN < C_PRIMITIVE
+            attr_reader :true_valid, :false_valid, :assumed_value
+
+            def initialize(args = { })
+              @true_valid = args[:true_valid] ? args[:true_valid] : false
+              @false_valid = args[:false_valid] ? args[:false_valid] : false
+              @assumed_value = args[:assumed_value] ? args[:assumed_value] : false
+              binary_consistency(@true_valid, @false_valid)
             end
-            def set_true_valid(true_valid)
+
+            def true_valid=(true_valid)
               binary_consistency(true_valid, @false_valid)
               @true_valid = true_valid
             end
-            def set_false_valid(false_valid)
+
+            def false_valid=(false_valid)
               binary_consistency(@true_valid,false_valid)
               @false_valid = false_valid 
             end
-            def true_valid?
-              @true_valid
-            end
-            def false_valid?
-              @false_valid
-            end
+
             def valid_value?
               
             end
-            def default_value(a_value=nil)
+
+            def default_value(a_value = nil)
               if a_value == nil
                 @true_valid
@@ -63,7 +62,34 @@
           end # of C_Boolean
 
-          class C_Integer < C_Primitive
+          class C_STRING < C_PRIMITIVE
             
           end
+
+          class C_INTEGER < C_PRIMITIVE
+            
+          end
+
+          class C_REAL < C_PRIMITIVE
+            
+          end
+
+          class C_TIME < C_PRIMITIVE
+            
+          end
+
+          class C_DATE < C_PRIMITIVE
+            
+          end
+
+          class C_DATE_TIME < C_PRIMITIVE
+            
+          end
+
+          class C_DURATION < C_PRIMITIVE
+            
+          end
+
+
+
         end # of Primitive
       end # of Constraint_Model
Index: ruby/trunk/models/am/archetype/ontology.rb
===================================================================
--- ruby/trunk/models/am/archetype/ontology.rb	(revision 21)
+++ ruby/trunk/models/am/archetype/ontology.rb	(revision 23)
@@ -3,35 +3,47 @@
     module Archetype
       module Ontology
-        class Archetype_Ontology
+        class ARCHETYPE_ONTOLOGY
           attr_accessor :constraint_codes, :specialisation_depth
           attr_accessor :term_attribute_names, :term_codes
           attr_accessor :terminologies_available
+
           def constraint_binding(a_terminology, a_code)
           end
+
           def constraint_definition(a_lang, a_code)
           end
+
           def has_language?(a_lang)
           end
+
           def has_terminology?(a_terminology)
           end
+
           def term_binding(a_terminology, a_code)
           end
+
           def term_definition(a_lang, a_code)
           end
         end
-        class Archetype_Term
+
+        class ARCHETYPE_TERM
           attr_accessor :code, :items
-          def initialize(code, items)
-            if code == nil
-              raise ArgumentError, "Code is empty"
-            end
-            if items.keys == nil
-              raise ArgumentError, "Items is empty"
-            end
-            @code = code
-            @items = items
+
+          def initialize(args = { })
+                         
+            @code = if args[:code]
+                      args[:code]
+                    else
+                      raise ArgumentError, "Code is empty"
+                    end
+            @items = if args[:items]
+                       args[:items]
+                     else
+                       raise ArgumentError, "Items is empty"
+                     end
           end
+
           def keys
-            items.keys
+            @items.keys
           end
         end
Index: ruby/trunk/models/am/openehr_profile/data_types/basic.rb
===================================================================
--- ruby/trunk/models/am/openehr_profile/data_types/basic.rb	(revision 21)
+++ ruby/trunk/models/am/openehr_profile/data_types/basic.rb	(revision 23)
@@ -1,6 +1,27 @@
 module OpenEHR
-  module RM
+  module AM
     module OpenEHR_Profile
       module Data_Types
+        module Basic
+          class C_DV_STATE
+          end
+
+          class STATE_MACHINE
+          end
+
+          class STATE
+          end
+
+          class TERMINAL_STATE < STATE
+          end
+
+          class NON_TERMINAL_STATE < STATE
+          end
+
+          class TRANSITION
+          end
+        end
+
+        
       end # of Data_Types
     end # of OpenEHR Profile
Index: ruby/trunk/models/am/openehr_profile/data_types/quantity.rb
===================================================================
--- ruby/trunk/models/am/openehr_profile/data_types/quantity.rb	(revision 23)
+++ ruby/trunk/models/am/openehr_profile/data_types/quantity.rb	(revision 23)
@@ -0,0 +1,19 @@
+module OpenEHR
+  module AM
+    module OpenEHR_Profile
+      module Data_Types
+
+        module Quantity
+          class C_DV_QUANTITY < OpenEHR::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE
+          end
+          
+          class C_DV_ORDINAL < OpenEHR::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE
+          end
+
+          class C_QUANTITY_ITEM
+          end
+        end
+      end # of Data_Types
+    end # of OpenEHR Profile
+  end # of RM
+end # of OpenEHR
Index: ruby/trunk/models/am/openehr_profile/data_types/text.rb
===================================================================
--- ruby/trunk/models/am/openehr_profile/data_types/text.rb	(revision 23)
+++ ruby/trunk/models/am/openehr_profile/data_types/text.rb	(revision 23)
@@ -0,0 +1,12 @@
+module OpenEHR
+  module AM
+    module OpenEHR_Profile
+      module Data_Types
+        module Text
+          class C_CODE_PHASE < OpenEHR::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE
+          end
+        end
+      end # of Data_Types
+    end # of OpenEHR Profile
+  end # of RM
+end # of OpenEHR
Index: ruby/trunk/models/tests/test_archetype_model.rb
===================================================================
--- ruby/trunk/models/tests/test_archetype_model.rb	(revision 21)
+++ ruby/trunk/models/tests/test_archetype_model.rb	(revision 23)
@@ -5,17 +5,31 @@
 class ArchetypeModelTest < Test::Unit::TestCase
   def setup
-    @archetype = OpenEHR::AM::Archetype::ARCHETYPE.new #(nil,nil,nil,nil,nil,nil,nil,nil)
+    @archetype = OpenEHR::AM::Archetype::ARCHETYPE.new
+    @validity_kind = OpenEHR::AM::Archetype::VALIDITY_KIND.new
+
     @archetype_description = OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION.new
+    @archetype_description_item = OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION_ITEM.new
+  end
+  
+  def test_init
+    assert_instance_of OpenEHR::AM::Archetype::ARCHETYPE, @archetype
+    assert_instance_of OpenEHR::AM::Archetype::VALIDITY_KIND, @validity_kind
+    assert_instance_of OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION, @archetype_description
+    assert_instance_of OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION_ITEM, @archetype_description_item
+    assert_instance_of OpenEHR::AM::Archetype::ARCHETYPE, @archetype
+  end
+end
+
+class ArchetypeModelConstraintTest < Test::Unit::TestCase
+  def setup
     @archetype_constraint = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT.new
-    @assertion = OpenEHR::AM::Archetype::Constraint_Model::Assertion::Assertion.new
-    @c_primitive = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_Primitive.new
-    @c_boolean = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_Boolean.new(true, true, true)
-    @c_integer = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_Integer.new
-    @archetype_ontology = OpenEHR::AM::Archetype::Ontology::Archetype_Ontology.new
-
+    @cardinality = OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY.new    
+    
     @archetype_constraint = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT.new
     @c_object = OpenEHR::AM::Archetype::Constraint_Model::C_OBJECT.new
     @c_defined_object = OpenEHR::AM::Archetype::Constraint_Model::C_DEFINED_OBJECT.new
     @c_attribute = OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE.new
+    @c_single_attribute = OpenEHR::AM::Archetype::Constraint_Model::C_SINGLE_ATTRIBUTE.new
+    @c_multiple_attribute = OpenEHR::AM::Archetype::Constraint_Model::C_MULTIPLE_ATTRIBUTE.new(:rm_attribute_name => 'attribute_name', :cardinality => @cardinality)
     @c_primitive_object = OpenEHR::AM::Archetype::Constraint_Model::C_PRIMITIVE_OBJECT.new
     @c_reference_object =  OpenEHR::AM::Archetype::Constraint_Model::C_REFERENCE_OBJECT.new
@@ -24,19 +38,16 @@
     @constraint_ref = OpenEHR::AM::Archetype::Constraint_Model::CONSTRAINT_REF.new
     @c_domain_type = OpenEHR::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE.new
-    @c_complex_object = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.new
+    @c_complex_object = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.new(:attributes => [@c_single_attribute])
   end
-  
+
   def test_init
-    assert_instance_of OpenEHR::AM::Archetype::Ontology::Archetype_Ontology, @archetype_ontology
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT, @archetype_constraint
-    assert_instance_of OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION, @archetype_description
-    assert_instance_of OpenEHR::AM::Archetype::ARCHETYPE, @archetype
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Assertion::Assertion, @assertion
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_Primitive, @c_primitive
-    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_Boolean, @c_boolean
     assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT, @archetype_constraint
     assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_OBJECT, @c_object
     assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_DEFINED_OBJECT, @c_defined_object
     assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE, @c_attribute
+    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_SINGLE_ATTRIBUTE, @c_single_attribute
+    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_MULTIPLE_ATTRIBUTE, @c_multiple_attribute
+    assert_equal 'attribute_name', @c_multiple_attribute.rm_attribute_name
+    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY, @c_multiple_attribute.cardinality
     assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_PRIMITIVE_OBJECT, @c_primitive_object
     assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_REFERENCE_OBJECT, @c_reference_object
@@ -46,16 +57,129 @@
     assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE, @c_domain_type
     assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, @c_complex_object
+    assert_instance_of Array, @c_complex_object.attributes
+    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT, @archetype_constraint
+    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY, @cardinality
+  end
+
+  def test_create
+    c_complex_object = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.create(:node_id => 'test_node',
+                                                                                         :attributes => [1,2],
+                                                                                         :assumed_value => Array
+                                                                                         )
+    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, c_complex_object
+    assert_equal 'test_node', c_complex_object.node_id
+  end
+end
+
+class ArchetypeModelPrimitiveTest < Test::Unit::TestCase
+  def setup
+    @c_primitive = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_PRIMITIVE.new
+    @c_boolean = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true,
+                                                                                    :false_valid => true,
+                                                                                    :assumed_value => true)
+    @c_string = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_STRING.new
+    @c_integer = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_INTEGER.new
+    @c_real = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_REAL.new
+    @c_time = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_TIME.new
+    @c_date = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE.new
+    @c_date_time = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME.new
+    @c_duration = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DURATION.new
+  end
+
+  def test_init
+    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_PRIMITIVE, @c_primitive
+    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN, @c_boolean
+    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_STRING, @c_string
+    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_INTEGER, @c_integer
+    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_REAL, @c_real
+    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_TIME, @c_time
+    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE, @c_date
+    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME, @c_date_time
+    assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DURATION, @c_duration
   end
 
   def test_primitive
-    assert @c_boolean.true_valid?
-    assert @c_boolean.false_valid?
+    assert @c_boolean.true_valid
+    assert @c_boolean.false_valid
     assert @c_boolean.assumed_value
     assert @c_boolean.has_assumed_value?
     assert @c_boolean.default_value
     assert @c_boolean.default_value(true)
-    assert_raise(ArgumentError) {@c_boolean.set_true_valid(false); @c_boolean.set_false_valid(false)}
-    assert_raise(ArgumentError) {OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_Boolean.new(false,false,false)}
+    assert_raise(ArgumentError) do
+      @c_boolean.true_valid = false
+      @c_boolean.false_valid = false
+    end
+    assert_raise(ArgumentError) do 
+      OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid =>false,
+                                                                         :false_valid => false,
+                                                                         :assumed_value => false)
+    end
+  end
+  
+end
+
+class ArchetypeModelOntologyTest < Test::Unit::TestCase
+  def setup
+    @archetype_ontology = OpenEHR::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY.new
+    @archetype_term = OpenEHR::AM::Archetype::Ontology::ARCHETYPE_TERM.new(:code => '', :items => '')
+  end
+
+  def test_init
+    assert_instance_of OpenEHR::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY, @archetype_ontology
+    assert_instance_of OpenEHR::AM::Archetype::Ontology::ARCHETYPE_TERM, @archetype_term
+  end
+end
+    
+class ArchetypeModelAssertionTest < Test::Unit::TestCase
+  def setup
+    @assertion = OpenEHR::AM::Archetype::Assertion::ASSERTION.new
+    @assertion_variable = OpenEHR::AM::Archetype::Assertion::ASSERTION_VARIABLE.new
+    @operator_kind = OpenEHR::AM::Archetype::Assertion::OPERATOR_KIND.new
+    @expr_item = OpenEHR::AM::Archetype::Assertion::EXPR_ITEM.new
+    @expr_leaf = OpenEHR::AM::Archetype::Assertion::EXPR_LEAF.new
+    @expr_operator = OpenEHR::AM::Archetype::Assertion::EXPR_OPERATOR.new
+    @expr_unary_operator = OpenEHR::AM::Archetype::Assertion::EXPR_UNARY_OPERATOR.new
+    @expr_binary_operator = OpenEHR::AM::Archetype::Assertion::EXPR_BINARY_OPERATOR.new
+  end
+
+  def test_init
+    assert_instance_of OpenEHR::AM::Archetype::Assertion::ASSERTION, @assertion
+    assert_instance_of OpenEHR::AM::Archetype::Assertion::ASSERTION_VARIABLE, @assertion_variable
+    assert_instance_of OpenEHR::AM::Archetype::Assertion::OPERATOR_KIND, @operator_kind
+    assert_instance_of OpenEHR::AM::Archetype::Assertion::EXPR_ITEM, @expr_item
+    assert_instance_of OpenEHR::AM::Archetype::Assertion::EXPR_LEAF, @expr_leaf
+    assert_instance_of OpenEHR::AM::Archetype::Assertion::EXPR_OPERATOR, @expr_operator
+    assert_instance_of OpenEHR::AM::Archetype::Assertion::EXPR_UNARY_OPERATOR, @expr_unary_operator
+    assert_instance_of OpenEHR::AM::Archetype::Assertion::EXPR_BINARY_OPERATOR, @expr_binary_operator
   end
 end
 
+class ArchetypeModelProfileTest < Test::Unit::TestCase
+  def setup
+    @c_dv_state = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::C_DV_STATE.new
+    @state_machine = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::STATE_MACHINE.new
+    @state = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::STATE.new
+    @terminal_state = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::TERMINAL_STATE.new
+    @non_terminal_state = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::NON_TERMINAL_STATE.new
+    @transition = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::TRANSITION.new
+
+    @c_code_phase = OpenEHR::AM::OpenEHR_Profile::Data_Types::Text::C_CODE_PHASE.new
+
+    @c_dv_quantity = OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_DV_QUANTITY.new
+    @c_dv_ordinal = OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_DV_ORDINAL.new
+    @c_quantity_item = OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_QUANTITY_ITEM.new
+  end
+
+  def test_init
+    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::C_DV_STATE, @c_dv_state
+    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::STATE_MACHINE, @state_machine
+    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::STATE, @state
+    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::TERMINAL_STATE, @terminal_state
+    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::NON_TERMINAL_STATE, @non_terminal_state
+    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::TRANSITION, @transition
+    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Text::C_CODE_PHASE, @c_code_phase
+    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_DV_QUANTITY, @c_dv_quantity
+    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_DV_ORDINAL, @c_dv_ordinal
+    assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_QUANTITY_ITEM, @c_quantity_item
+  end
+end
