source: ruby/trunk/lib/adl_parser/tests/shell_test.rb@ 48

Last change on this file since 48 was 48, checked in by Tatsukawa, Akimichi, 16 years ago

all of adl_parser unit tests are successful

File size: 768 bytes
Line 
1require 'adl_parser.rb'
2require 'test/unit'
3
4class ShellADLValidatorTest < Test::Unit::TestCase
5 def setup
6 @adl_validator = ::OpenEHR::Application::ADLValidator.new(::OpenEHR::ADL::Validator.new(::OpenEHR::ADL::Parser.new))
7 @file = File.open('tests/openEHR-EHR-CLUSTER.exam-nervous_system.v1.adl')
8 @string = File.read('tests/openEHR-EHR-CLUSTER.exam-nervous_system.v1.adl')
9 @stringio = StringIO.new(@string)
10 end
11
12 def test_init
13 assert_instance_of ::OpenEHR::Application::ADLValidator,@adl_validator
14 end
15
16 def test_run
17 assert_nothing_raised do
18 @adl_validator.run(@file)
19 end
20 assert_nothing_raised do
21 @adl_validator.run(@string)
22 end
23 assert_nothing_raised do
24 @adl_validator.run(@stringio)
25 end
26 end
27end
Note: See TracBrowser for help on using the repository browser.