Changeset 23 for ruby/trunk/models
- Timestamp:
- May 1, 2008, 8:21:09 AM (16 years ago)
- Location:
- ruby/trunk/models
- Files:
-
- 2 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/trunk/models/Rakefile
r21 r23 48 48 # s.require_paths += [".","am","rm"] 49 49 s.require_path = "." 50 #s.has_rdoc = true50 s.has_rdoc = true 51 51 # s.extra_rdoc_files = ["README"] 52 52 end -
ruby/trunk/models/am.rb
r21 r23 27 27 module Constraint_Model 28 28 autoload :ARCHETYPE_CONSTRAINT, "am/archetype/constraint_model/archetype_constraint.rb" 29 autoload :Assertion, "am/archetype/constraint_model/assertion.rb"30 29 autoload :Primitive, "am/archetype/constraint_model/primitive.rb" 31 30 end #end of ConstraintModel 31 32 module Assertion 33 autoload :ASSERTION, "am/archetype/constraint_model/assertion.rb" 34 end 35 32 36 end # of Archetype 37 38 module OpenEHR_Profile 39 module Data_Types 40 module Basic 41 autoload :C_DV_STATE, "am/openehr_profile/data_types/basic.rb" 42 end 43 44 module Text 45 autoload :C_CODE_PHASE, "am/openehr_profile/data_types/text.rb" 46 end 47 48 module Quantity 49 autoload :C_DV_QUANTITY, "am/openehr_profile/data_types/quantity.rb" 50 autoload :C_DV_ORDINAL, "am/openehr_profile/data_types/quantity.rb" 51 autoload :C_QUANTITY_ITEM, "am/openehr_profile/data_types/quantity.rb" 52 end 53 end 54 end 33 55 end # of AM 34 56 end # of OpenEHR -
ruby/trunk/models/am/archetype/archetype.rb
r21 r23 77 77 def version 78 78 end 79 end 79 end # end of ARCHETYPE 80 80 # original file: 81 81 # ref_imple_eiffel/components/adl_parser/src/interface/adl_definition.e 82 end # end of Archetype 82 83 class VALIDITY_KIND 84 end 85 end 86 87 83 88 end # end of AM 84 89 end # end of OpenEHR -
ruby/trunk/models/am/archetype/archetype_description/archetype_description.rb
r21 r23 11 11 end 12 12 13 class A rchetype_Description_Item13 class ARCHETYPE_DESCRIPTION_ITEM 14 14 attr_accessor :archetype_package_uri, :lifecycle_state, :original_author, :other_contributors, :other_details 15 15 end -
ruby/trunk/models/am/archetype/constraint_model/archetype_constraint.rb
r21 r23 8 8 end 9 9 10 class C _OBJECT < ARCHETYPE_CONSTRAINT10 class CARDINALITY 11 11 12 12 end 13 13 14 class C_OBJECT < ARCHETYPE_CONSTRAINT 15 attr_accessor :node_id, :occurrences, :rm_type_name 16 17 def initialize(args = { }) 18 @node_id = args[:node_id] if args[:node_id] 19 @occurrences = args[:occurrences] if args[:occurrences] 20 @rm_type_name = args[:rm_type_name] if args[:rm_type_name] 21 end 22 end 23 14 24 class C_ATTRIBUTE < ARCHETYPE_CONSTRAINT 15 25 attr_accessor :rm_attribute_name, :existence, :children 26 27 def initialize(args = { }) 28 @rm_attribute_name = args[:rm_attribute_name] if args[:rm_attribute_name] 29 @existence = args[:existence] if args[:existence] 30 @children = args[:children] ? args[:children] : [] 31 32 end 16 33 end 17 34 18 35 class C_DEFINED_OBJECT < C_OBJECT 36 attr_accessor :assumed_value 19 37 38 def initialize(args = { }) 39 @assumed_value = args[:assumed_value] if args[:assumed_value] 40 super 41 end 20 42 end 21 43 22 44 class C_PRIMITIVE_OBJECT < C_DEFINED_OBJECT 45 attr_accessor :item 23 46 47 def initialize(args = { }) 48 @attributes = args[:item] if args[:item] 49 super 50 end 24 51 end 25 52 … … 27 54 attr_accessor :attributes, :attributes_valid 28 55 56 def initialize(args = { }) 57 @attributes = args[:attributes] ? args[:attributes] : [] 58 super 59 end 60 61 def self.create(args = { }, &block) 62 c_complex_object = new(args) 63 if block_given? 64 yield c_complex_object 65 end 66 return c_complex_object 67 end 29 68 end 30 69 … … 49 88 end 50 89 90 class C_SINGLE_ATTRIBUTE < C_ATTRIBUTE 91 attr_accessor :alternatives 92 93 def initialize(args = { }) 94 @alternatives = args[:alternatives] ? args[:alternatives] : [] 95 super 96 end 97 end 98 99 class C_MULTIPLE_ATTRIBUTE < C_ATTRIBUTE 100 attr_accessor :members, :cardinality 101 102 def initialize(args = { }) 103 @members = args[:members] ? args[:members] : [] 104 @cardinality = args[:cardinality] if args[:cardinality] 105 super 106 end 107 end 51 108 end 52 109 end -
ruby/trunk/models/am/archetype/constraint_model/assertion.rb
r4 r23 2 2 module AM 3 3 module Archetype 4 module Constraint_Model 5 module Assertion 6 class Assertion 7 end 4 module Assertion 5 class ASSERTION 6 end 7 8 class ASSERTION_VARIABLE 9 end 10 11 class OPERATOR_KIND 12 end 13 14 class EXPR_ITEM 15 end 16 17 class EXPR_LEAF < EXPR_ITEM 18 end 19 20 class EXPR_OPERATOR < EXPR_ITEM 21 end 22 23 class EXPR_UNARY_OPERATOR < EXPR_OPERATOR 24 end 25 26 class EXPR_BINARY_OPERATOR < EXPR_OPERATOR 8 27 end 9 28 end -
ruby/trunk/models/am/archetype/constraint_model/primitive.rb
r21 r23 6 6 module Primitive 7 7 8 class C_P rimitive8 class C_PRIMITIVE 9 9 def assumed_value 10 10 raise NotImplementedError, "assumed_value should be implemented" … … 21 21 end 22 22 23 class C_Boolean < C_Primitive 24 attr_accessor :assumed_value 25 def initialize(true_valid, false_valid, assumed_value) 26 binary_consistency(true_valid, false_valid) 27 @true_valid = true_valid 28 @false_valid = false_valid 29 @assumed_value = assumed_value 23 class C_BOOLEAN < C_PRIMITIVE 24 attr_reader :true_valid, :false_valid, :assumed_value 25 26 def initialize(args = { }) 27 @true_valid = args[:true_valid] ? args[:true_valid] : false 28 @false_valid = args[:false_valid] ? args[:false_valid] : false 29 @assumed_value = args[:assumed_value] ? args[:assumed_value] : false 30 binary_consistency(@true_valid, @false_valid) 30 31 end 31 def set_true_valid(true_valid) 32 33 def true_valid=(true_valid) 32 34 binary_consistency(true_valid, @false_valid) 33 35 @true_valid = true_valid 34 36 end 35 def set_false_valid(false_valid) 37 38 def false_valid=(false_valid) 36 39 binary_consistency(@true_valid,false_valid) 37 40 @false_valid = false_valid 38 41 end 39 def true_valid? 40 @true_valid 41 end 42 def false_valid? 43 @false_valid 44 end 42 45 43 def valid_value? 46 44 47 45 end 48 def default_value(a_value=nil) 46 47 def default_value(a_value = nil) 49 48 if a_value == nil 50 49 @true_valid … … 63 62 end # of C_Boolean 64 63 65 class C_ Integer < C_Primitive64 class C_STRING < C_PRIMITIVE 66 65 67 66 end 67 68 class C_INTEGER < C_PRIMITIVE 69 70 end 71 72 class C_REAL < C_PRIMITIVE 73 74 end 75 76 class C_TIME < C_PRIMITIVE 77 78 end 79 80 class C_DATE < C_PRIMITIVE 81 82 end 83 84 class C_DATE_TIME < C_PRIMITIVE 85 86 end 87 88 class C_DURATION < C_PRIMITIVE 89 90 end 91 92 93 68 94 end # of Primitive 69 95 end # of Constraint_Model -
ruby/trunk/models/am/archetype/ontology.rb
r4 r23 3 3 module Archetype 4 4 module Ontology 5 class A rchetype_Ontology5 class ARCHETYPE_ONTOLOGY 6 6 attr_accessor :constraint_codes, :specialisation_depth 7 7 attr_accessor :term_attribute_names, :term_codes 8 8 attr_accessor :terminologies_available 9 9 10 def constraint_binding(a_terminology, a_code) 10 11 end 12 11 13 def constraint_definition(a_lang, a_code) 12 14 end 15 13 16 def has_language?(a_lang) 14 17 end 18 15 19 def has_terminology?(a_terminology) 16 20 end 21 17 22 def term_binding(a_terminology, a_code) 18 23 end 24 19 25 def term_definition(a_lang, a_code) 20 26 end 21 27 end 22 class Archetype_Term 28 29 class ARCHETYPE_TERM 23 30 attr_accessor :code, :items 24 def initialize(code, items) 25 if code == nil 26 raise ArgumentError, "Code is empty" 27 end 28 if items.keys == nil 29 raise ArgumentError, "Items is empty" 30 end 31 @code = code 32 @items = items 31 32 def initialize(args = { }) 33 34 @code = if args[:code] 35 args[:code] 36 else 37 raise ArgumentError, "Code is empty" 38 end 39 @items = if args[:items] 40 args[:items] 41 else 42 raise ArgumentError, "Items is empty" 43 end 33 44 end 45 34 46 def keys 35 items.keys47 @items.keys 36 48 end 37 49 end -
ruby/trunk/models/am/openehr_profile/data_types/basic.rb
r4 r23 1 1 module OpenEHR 2 module RM2 module AM 3 3 module OpenEHR_Profile 4 4 module Data_Types 5 module Basic 6 class C_DV_STATE 7 end 8 9 class STATE_MACHINE 10 end 11 12 class STATE 13 end 14 15 class TERMINAL_STATE < STATE 16 end 17 18 class NON_TERMINAL_STATE < STATE 19 end 20 21 class TRANSITION 22 end 23 end 24 25 5 26 end # of Data_Types 6 27 end # of OpenEHR Profile -
ruby/trunk/models/tests/test_archetype_model.rb
r21 r23 5 5 class ArchetypeModelTest < Test::Unit::TestCase 6 6 def setup 7 @archetype = OpenEHR::AM::Archetype::ARCHETYPE.new #(nil,nil,nil,nil,nil,nil,nil,nil) 7 @archetype = OpenEHR::AM::Archetype::ARCHETYPE.new 8 @validity_kind = OpenEHR::AM::Archetype::VALIDITY_KIND.new 9 8 10 @archetype_description = OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION.new 11 @archetype_description_item = OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION_ITEM.new 12 end 13 14 def test_init 15 assert_instance_of OpenEHR::AM::Archetype::ARCHETYPE, @archetype 16 assert_instance_of OpenEHR::AM::Archetype::VALIDITY_KIND, @validity_kind 17 assert_instance_of OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION, @archetype_description 18 assert_instance_of OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION_ITEM, @archetype_description_item 19 assert_instance_of OpenEHR::AM::Archetype::ARCHETYPE, @archetype 20 end 21 end 22 23 class ArchetypeModelConstraintTest < Test::Unit::TestCase 24 def setup 9 25 @archetype_constraint = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT.new 10 @assertion = OpenEHR::AM::Archetype::Constraint_Model::Assertion::Assertion.new 11 @c_primitive = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_Primitive.new 12 @c_boolean = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_Boolean.new(true, true, true) 13 @c_integer = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_Integer.new 14 @archetype_ontology = OpenEHR::AM::Archetype::Ontology::Archetype_Ontology.new 15 26 @cardinality = OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY.new 27 16 28 @archetype_constraint = OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT.new 17 29 @c_object = OpenEHR::AM::Archetype::Constraint_Model::C_OBJECT.new 18 30 @c_defined_object = OpenEHR::AM::Archetype::Constraint_Model::C_DEFINED_OBJECT.new 19 31 @c_attribute = OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE.new 32 @c_single_attribute = OpenEHR::AM::Archetype::Constraint_Model::C_SINGLE_ATTRIBUTE.new 33 @c_multiple_attribute = OpenEHR::AM::Archetype::Constraint_Model::C_MULTIPLE_ATTRIBUTE.new(:rm_attribute_name => 'attribute_name', :cardinality => @cardinality) 20 34 @c_primitive_object = OpenEHR::AM::Archetype::Constraint_Model::C_PRIMITIVE_OBJECT.new 21 35 @c_reference_object = OpenEHR::AM::Archetype::Constraint_Model::C_REFERENCE_OBJECT.new … … 24 38 @constraint_ref = OpenEHR::AM::Archetype::Constraint_Model::CONSTRAINT_REF.new 25 39 @c_domain_type = OpenEHR::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE.new 26 @c_complex_object = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.new 40 @c_complex_object = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.new(:attributes => [@c_single_attribute]) 27 41 end 28 42 29 43 def test_init 30 assert_instance_of OpenEHR::AM::Archetype::Ontology::Archetype_Ontology, @archetype_ontology31 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT, @archetype_constraint32 assert_instance_of OpenEHR::AM::Archetype::Archetype_Description::ARCHETYPE_DESCRIPTION, @archetype_description33 assert_instance_of OpenEHR::AM::Archetype::ARCHETYPE, @archetype34 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Assertion::Assertion, @assertion35 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_Primitive, @c_primitive36 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_Boolean, @c_boolean37 44 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT, @archetype_constraint 38 45 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_OBJECT, @c_object 39 46 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_DEFINED_OBJECT, @c_defined_object 40 47 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_ATTRIBUTE, @c_attribute 48 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_SINGLE_ATTRIBUTE, @c_single_attribute 49 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_MULTIPLE_ATTRIBUTE, @c_multiple_attribute 50 assert_equal 'attribute_name', @c_multiple_attribute.rm_attribute_name 51 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY, @c_multiple_attribute.cardinality 41 52 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_PRIMITIVE_OBJECT, @c_primitive_object 42 53 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_REFERENCE_OBJECT, @c_reference_object … … 46 57 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_DOMAIN_TYPE, @c_domain_type 47 58 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, @c_complex_object 59 assert_instance_of Array, @c_complex_object.attributes 60 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::ARCHETYPE_CONSTRAINT, @archetype_constraint 61 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::CARDINALITY, @cardinality 62 end 63 64 def test_create 65 c_complex_object = OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT.create(:node_id => 'test_node', 66 :attributes => [1,2], 67 :assumed_value => Array 68 ) 69 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::C_COMPLEX_OBJECT, c_complex_object 70 assert_equal 'test_node', c_complex_object.node_id 71 end 72 end 73 74 class ArchetypeModelPrimitiveTest < Test::Unit::TestCase 75 def setup 76 @c_primitive = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_PRIMITIVE.new 77 @c_boolean = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid => true, 78 :false_valid => true, 79 :assumed_value => true) 80 @c_string = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_STRING.new 81 @c_integer = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_INTEGER.new 82 @c_real = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_REAL.new 83 @c_time = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_TIME.new 84 @c_date = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE.new 85 @c_date_time = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME.new 86 @c_duration = OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DURATION.new 87 end 88 89 def test_init 90 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_PRIMITIVE, @c_primitive 91 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN, @c_boolean 92 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_STRING, @c_string 93 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_INTEGER, @c_integer 94 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_REAL, @c_real 95 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_TIME, @c_time 96 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE, @c_date 97 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DATE_TIME, @c_date_time 98 assert_instance_of OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_DURATION, @c_duration 48 99 end 49 100 50 101 def test_primitive 51 assert @c_boolean.true_valid ?52 assert @c_boolean.false_valid ?102 assert @c_boolean.true_valid 103 assert @c_boolean.false_valid 53 104 assert @c_boolean.assumed_value 54 105 assert @c_boolean.has_assumed_value? 55 106 assert @c_boolean.default_value 56 107 assert @c_boolean.default_value(true) 57 assert_raise(ArgumentError) {@c_boolean.set_true_valid(false); @c_boolean.set_false_valid(false)} 58 assert_raise(ArgumentError) {OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_Boolean.new(false,false,false)} 108 assert_raise(ArgumentError) do 109 @c_boolean.true_valid = false 110 @c_boolean.false_valid = false 111 end 112 assert_raise(ArgumentError) do 113 OpenEHR::AM::Archetype::Constraint_Model::Primitive::C_BOOLEAN.new(:true_valid =>false, 114 :false_valid => false, 115 :assumed_value => false) 116 end 117 end 118 119 end 120 121 class ArchetypeModelOntologyTest < Test::Unit::TestCase 122 def setup 123 @archetype_ontology = OpenEHR::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY.new 124 @archetype_term = OpenEHR::AM::Archetype::Ontology::ARCHETYPE_TERM.new(:code => '', :items => '') 125 end 126 127 def test_init 128 assert_instance_of OpenEHR::AM::Archetype::Ontology::ARCHETYPE_ONTOLOGY, @archetype_ontology 129 assert_instance_of OpenEHR::AM::Archetype::Ontology::ARCHETYPE_TERM, @archetype_term 130 end 131 end 132 133 class ArchetypeModelAssertionTest < Test::Unit::TestCase 134 def setup 135 @assertion = OpenEHR::AM::Archetype::Assertion::ASSERTION.new 136 @assertion_variable = OpenEHR::AM::Archetype::Assertion::ASSERTION_VARIABLE.new 137 @operator_kind = OpenEHR::AM::Archetype::Assertion::OPERATOR_KIND.new 138 @expr_item = OpenEHR::AM::Archetype::Assertion::EXPR_ITEM.new 139 @expr_leaf = OpenEHR::AM::Archetype::Assertion::EXPR_LEAF.new 140 @expr_operator = OpenEHR::AM::Archetype::Assertion::EXPR_OPERATOR.new 141 @expr_unary_operator = OpenEHR::AM::Archetype::Assertion::EXPR_UNARY_OPERATOR.new 142 @expr_binary_operator = OpenEHR::AM::Archetype::Assertion::EXPR_BINARY_OPERATOR.new 143 end 144 145 def test_init 146 assert_instance_of OpenEHR::AM::Archetype::Assertion::ASSERTION, @assertion 147 assert_instance_of OpenEHR::AM::Archetype::Assertion::ASSERTION_VARIABLE, @assertion_variable 148 assert_instance_of OpenEHR::AM::Archetype::Assertion::OPERATOR_KIND, @operator_kind 149 assert_instance_of OpenEHR::AM::Archetype::Assertion::EXPR_ITEM, @expr_item 150 assert_instance_of OpenEHR::AM::Archetype::Assertion::EXPR_LEAF, @expr_leaf 151 assert_instance_of OpenEHR::AM::Archetype::Assertion::EXPR_OPERATOR, @expr_operator 152 assert_instance_of OpenEHR::AM::Archetype::Assertion::EXPR_UNARY_OPERATOR, @expr_unary_operator 153 assert_instance_of OpenEHR::AM::Archetype::Assertion::EXPR_BINARY_OPERATOR, @expr_binary_operator 59 154 end 60 155 end 61 156 157 class ArchetypeModelProfileTest < Test::Unit::TestCase 158 def setup 159 @c_dv_state = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::C_DV_STATE.new 160 @state_machine = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::STATE_MACHINE.new 161 @state = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::STATE.new 162 @terminal_state = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::TERMINAL_STATE.new 163 @non_terminal_state = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::NON_TERMINAL_STATE.new 164 @transition = OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::TRANSITION.new 165 166 @c_code_phase = OpenEHR::AM::OpenEHR_Profile::Data_Types::Text::C_CODE_PHASE.new 167 168 @c_dv_quantity = OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_DV_QUANTITY.new 169 @c_dv_ordinal = OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_DV_ORDINAL.new 170 @c_quantity_item = OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_QUANTITY_ITEM.new 171 end 172 173 def test_init 174 assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::C_DV_STATE, @c_dv_state 175 assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::STATE_MACHINE, @state_machine 176 assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::STATE, @state 177 assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::TERMINAL_STATE, @terminal_state 178 assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::NON_TERMINAL_STATE, @non_terminal_state 179 assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Basic::TRANSITION, @transition 180 assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Text::C_CODE_PHASE, @c_code_phase 181 assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_DV_QUANTITY, @c_dv_quantity 182 assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_DV_ORDINAL, @c_dv_ordinal 183 assert_instance_of OpenEHR::AM::OpenEHR_Profile::Data_Types::Quantity::C_QUANTITY_ITEM, @c_quantity_item 184 end 185 end
Note:
See TracChangeset
for help on using the changeset viewer.