Last change
on this file since 141 was 116, checked in by Tatsukawa, Akimichi, 15 years ago |
refactored directory structure of adl_parser
|
File size:
885 bytes
|
Rev | Line | |
---|
[116] | 1 | require 'lib/adl_parser.rb'
|
---|
[4] | 2 | require 'test/unit'
|
---|
| 3 |
|
---|
| 4 | class ShellADLValidatorTest < Test::Unit::TestCase
|
---|
| 5 | def setup
|
---|
| 6 | @adl_validator = ::OpenEHR::Application::ADLValidator.new(::OpenEHR::ADL::Validator.new(::OpenEHR::ADL::Parser.new))
|
---|
| 7 | end
|
---|
| 8 |
|
---|
| 9 | def test_init
|
---|
| 10 | assert_instance_of ::OpenEHR::Application::ADLValidator,@adl_validator
|
---|
| 11 | end
|
---|
| 12 |
|
---|
| 13 | def test_run
|
---|
| 14 | assert_nothing_raised do
|
---|
[116] | 15 | adl_file = File.open('test/adl/openEHR-EHR-CLUSTER.exam-nervous_system.v1.adl')
|
---|
| 16 | @adl_validator.run(adl_file)
|
---|
[4] | 17 | end
|
---|
| 18 | assert_nothing_raised do
|
---|
[116] | 19 | adl_string = File.open('test/adl/openEHR-EHR-CLUSTER.exam-nervous_system.v1.adl')
|
---|
| 20 | @adl_validator.run(adl_string)
|
---|
[4] | 21 | end
|
---|
| 22 | assert_nothing_raised do
|
---|
[116] | 23 | adl_string = File.read('test/adl/openEHR-EHR-CLUSTER.exam-nervous_system.v1.adl')
|
---|
| 24 | stringio = StringIO.new(adl_string)
|
---|
| 25 | @adl_validator.run(stringio)
|
---|
[4] | 26 | end
|
---|
| 27 | end
|
---|
| 28 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.