Rev | Line | |
---|
[129] | 1 | require 'test/unit'
|
---|
| 2 | require 'set'
|
---|
| 3 | require 'rm'
|
---|
| 4 |
|
---|
[165] | 5 | include OpenEHR::RM::Data_Structures
|
---|
[291] | 6 | include OpenEHR::RM::Data_Structures::Item_Structure
|
---|
[129] | 7 |
|
---|
[292] | 8 |
|
---|
[129] | 9 | class RmDataStructureTest < Test::Unit::TestCase
|
---|
| 10 | def setup
|
---|
| 11 | name = OpenEHR::RM::Data_Types::Text::DV_Text.new('blood')
|
---|
| 12 | uid = OpenEHR::RM::Support::Identification::UID_Based_ID.new('ehr::test-1')
|
---|
| 13 | links = Set.new([uid])
|
---|
| 14 | assert_nothing_raised(Exception){
|
---|
[162] | 15 | @data_structure = OpenEHR::RM::Data_Structures::Data_Structure.new(:archetype_node_id => 'test',
|
---|
| 16 | :name => name,
|
---|
| 17 | :links => links) }
|
---|
[129] | 18 | end
|
---|
| 19 |
|
---|
| 20 | def test_init
|
---|
| 21 | assert_instance_of OpenEHR::RM::Data_Structures::Data_Structure, @data_structure
|
---|
| 22 | end
|
---|
| 23 |
|
---|
| 24 | def test_data_structure
|
---|
| 25 | assert_raise(NotImplementedError){@data_structure.as_hierarchy}
|
---|
| 26 | end
|
---|
| 27 | end
|
---|
[291] | 28 |
|
---|
| 29 | class RmDataStructureItemStructureTest < Test::Unit::TestCase
|
---|
| 30 | def setup
|
---|
| 31 | assert_nothing_raised(Exception){
|
---|
| 32 |
|
---|
| 33 | end
|
---|
| 34 |
|
---|
| 35 | def test_init
|
---|
| 36 | end
|
---|
| 37 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.