Changeset 307 for ruby/trunk/lib/adl_parser/test
- Timestamp:
- Sep 27, 2009, 9:24:19 PM (15 years ago)
- Location:
- ruby/trunk/lib/adl_parser/test
- Files:
-
- 2 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/trunk/lib/adl_parser/test/parser_test.rb
r291 r307 3 3 class ADLParserTest < Test::Unit::TestCase 4 4 def setup 5 @parser = ::OpenE HR::ADL::Parser.new5 @parser = ::OpenEhr::ADL::Parser.new 6 6 end 7 7 8 8 must "assert parser instance" do 9 assert_instance_of ::OpenE HR::ADL::Parser,@parser10 end 11 12 must " test_archetype_id.adl be properly parsed" do13 file = File.read("#{TEST_ROOT_DIR}/adl/ test_archetype_id.adl")9 assert_instance_of ::OpenEhr::ADL::Parser,@parser 10 end 11 12 must "openEHR-EHR-SECTION.summary.v1.adl be properly parsed" do 13 file = File.read("#{TEST_ROOT_DIR}/adl/openEHR-EHR-SECTION.summary.v1.adl") 14 14 assert_nothing_raised do 15 15 ast = @parser.parse(file, 'openEHR-EHR-SECTION.summary.v1') 16 assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id16 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 17 17 end 18 18 end … … 22 22 assert_nothing_raised do 23 23 ast = @parser.parse(file, 'openEHR-EHR-ACTION.imaging.v1') 24 assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id24 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 25 25 end 26 26 end … … 30 30 assert_nothing_raised do 31 31 ast = @parser.parse(file, 'openEHR-EHR-ACTION.referral.v1') 32 assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id32 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 33 33 end 34 34 end … … 38 38 assert_nothing_raised do 39 39 ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.auscultation-chest.v1') 40 assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id40 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 41 41 end 42 42 end … … 46 46 assert_nothing_raised do 47 47 ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.auscultation.v1') 48 assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id48 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 49 49 end 50 50 end … … 55 55 assert_nothing_raised do 56 56 ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-abdomen.v1') 57 assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id57 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 58 58 end 59 59 end … … 63 63 assert_nothing_raised do 64 64 ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-chest.v1') 65 assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id65 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 66 66 end 67 67 end … … 71 71 assert_nothing_raised do 72 72 ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-generic-joint.v1') 73 assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id73 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 74 74 end 75 75 end … … 79 79 assert_nothing_raised do 80 80 ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-generic-lymphnode.v1') 81 assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id81 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 82 82 end 83 83 end … … 87 87 assert_nothing_raised do 88 88 ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-generic-mass.v1') 89 assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id89 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 90 90 end 91 91 end … … 95 95 assert_nothing_raised do 96 96 ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-generic.v1') 97 assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id97 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 98 98 end 99 99 end … … 103 103 assert_nothing_raised do 104 104 ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-nervous_system.v1') 105 assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id105 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 106 106 end 107 107 end … … 111 111 assert_nothing_raised do 112 112 ast = @parser.parse(file, 'openEHR-EHR-COMPOSITION.discharge.v1draft') 113 assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id113 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 114 114 end 115 115 end … … 119 119 assert_nothing_raised do 120 120 ast = @parser.parse(file, 'openEHR-EHR-COMPOSITION.encounter.v1draft') 121 assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id121 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 122 122 end 123 123 end … … 127 127 assert_nothing_raised do 128 128 ast = @parser.parse(file, 'openEHR-EHR-INSTRUCTION.medication.v1') 129 assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id129 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 130 130 end 131 131 end … … 135 135 assert_nothing_raised do 136 136 ast = @parser.parse(file, 'openEHR-EHR-INSTRUCTION.referral.v1') 137 assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id137 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 138 138 end 139 139 end … … 143 143 assert_nothing_raised do 144 144 ast = @parser.parse(file, 'openEHR-EHR-ITEM_TREE.Laboratory_request.v1') 145 assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id145 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 146 146 end 147 147 end … … 152 152 assert_nothing_raised do 153 153 ast = @parser.parse(file, 'openEHR-EHR-OBSERVATION.apgar.v1') 154 assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id154 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 155 155 end 156 156 end … … 160 160 assert_nothing_raised do 161 161 ast = @parser.parse(file, 'openEHR-EHR-SECTION.findings.v1') 162 assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id162 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 163 163 end 164 164 end … … 168 168 assert_nothing_raised do 169 169 ast = @parser.parse(file, 'openEHR-EHR-SECTION.reason_for_encounter.v1') 170 assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id170 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 171 171 end 172 172 end … … 177 177 assert_nothing_raised do 178 178 ast = @parser.parse(file, 'openEHR-EHR-SECTION.vital_signs.v1') 179 assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id179 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 180 180 end 181 181 end … … 187 187 # assert_nothing_raised do 188 188 # ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.dimensions-circumference.v1') 189 # assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id189 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 190 190 # end 191 191 # end … … 195 195 # assert_nothing_raised do 196 196 # ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.dimensions.v1') 197 # assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id197 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 198 198 # end 199 199 # end … … 203 203 # assert_nothing_raised do 204 204 # ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-fetus.v1') 205 # assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id205 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 206 206 # end 207 207 # end … … 211 211 # assert_nothing_raised do 212 212 # ast = @parser.parse(file, 'openEHR-EHR-CLUSTER.exam-uterine_cervix.v1') 213 # assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id213 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 214 214 # end 215 215 # end … … 219 219 # assert_nothing_raised do 220 220 # ast = @parser.parse(file, 'openEHR-EHR-EVALUATION.adverse.v1') 221 # assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id221 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 222 222 # end 223 223 # end … … 226 226 # assert_nothing_raised do 227 227 # ast = @parser.parse(file, 'openEHR-EHR-OBSERVATION.body_mass_index.v1') 228 # assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID, ast.archetype_id228 # assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID, ast.archetype_id 229 229 # end 230 230 # end -
ruby/trunk/lib/adl_parser/test/scanner_test.rb
r291 r307 3 3 class ADLScannerTest < Test::Unit::TestCase 4 4 def setup 5 @scanner = OpenE HR::ADL::Scanner::ADLScanner.new([:adl], "filename")5 @scanner = OpenEhr::ADL::Scanner::ADLScanner.new([:adl], "filename") 6 6 end 7 7 8 must "assert OpenE HR::ADL::Scanner::ADLScanner scanner instance" do9 assert_instance_of OpenE HR::ADL::Scanner::ADLScanner, @scanner8 must "assert OpenEhr::ADL::Scanner::ADLScanner scanner instance" do 9 assert_instance_of OpenEhr::ADL::Scanner::ADLScanner, @scanner 10 10 end 11 11 … … 20 20 @scanner.scan("openEHR-EHR-OBSERVATION.body_mass_index.v1") do |sym, val| 21 21 assert_equal :V_ARCHETYPE_ID,sym 22 assert_instance_of OpenE HR::RM::Support::Identification::Archetype_ID,val22 assert_instance_of OpenEhr::RM::Support::Identification::ArchetypeID,val 23 23 end 24 24 end … … 40 40 class CADLScannerTest < Test::Unit::TestCase 41 41 def setup 42 @scanner = OpenE HR::ADL::Scanner::CADLScanner.new([:cadl], "filename")42 @scanner = OpenEhr::ADL::Scanner::CADLScanner.new([:cadl], "filename") 43 43 end 44 44 45 must "assert OpenE HR::ADL::Scanner::CADLScanner scanner instance" do46 assert_instance_of OpenE HR::ADL::Scanner::CADLScanner, @scanner45 must "assert OpenEhr::ADL::Scanner::CADLScanner scanner instance" do 46 assert_instance_of OpenEhr::ADL::Scanner::CADLScanner, @scanner 47 47 end 48 48 … … 80 80 class DADLScannerTest < Test::Unit::TestCase 81 81 def setup 82 @scanner = OpenE HR::ADL::Scanner::DADLScanner.new([:dadl], "filename")82 @scanner = OpenEhr::ADL::Scanner::DADLScanner.new([:dadl], "filename") 83 83 end 84 84 -
ruby/trunk/lib/adl_parser/test/shell_test.rb
r291 r307 3 3 class ShellADLValidatorTest < Test::Unit::TestCase 4 4 def setup 5 @adl_validator = ::OpenE HR::Application::ADLValidator.new(::OpenEHR::ADL::Validator.new(::OpenEHR::ADL::Parser.new))5 @adl_validator = ::OpenEhr::Application::ADLValidator.new(::OpenEhr::ADL::Validator.new(::OpenEhr::ADL::Parser.new)) 6 6 end 7 7 8 8 must "assert application validator instance" do 9 assert_instance_of ::OpenE HR::Application::ADLValidator,@adl_validator9 assert_instance_of ::OpenEhr::Application::ADLValidator,@adl_validator 10 10 end 11 11 -
ruby/trunk/lib/adl_parser/test/test_helper.rb
r261 r307 5 5 require "rubygems" 6 6 require 'adl_parser.rb' 7 require 'adl_scanner.rb' 8 require 'rm.rb' 9 require 'am.rb' 7 #require 'adl_scanner.rb' 8 #require 'open_ehr' 9 #require 'rm.rb' 10 #require 'am.rb' 10 11 11 12 -
ruby/trunk/lib/adl_parser/test/validator_test.rb
r291 r307 4 4 class ADLValidatorTest < Test::Unit::TestCase 5 5 def setup 6 @validator = ::OpenE HR::ADL::Validator.new(::OpenEHR::ADL::Parser.new)6 @validator = ::OpenEhr::ADL::Validator.new(::OpenEhr::ADL::Parser.new) 7 7 end 8 8 9 9 must "assert adl validator instance" do 10 assert_instance_of ::OpenE HR::ADL::Validator,@validator10 assert_instance_of ::OpenEhr::ADL::Validator,@validator 11 11 end 12 12
Note:
See TracChangeset
for help on using the changeset viewer.