Last change
on this file since 407 was 407, checked in by KOBAYASHI, Shinji, 14 years ago |
serializer implementation
Sample ADL was generated by LiU Archetype Editor.
There are some differences in XML forms amongs LiU, Ocean, CKM.
|
File size:
775 bytes
|
Rev | Line | |
---|
[406] | 1 | require File.dirname(__FILE__) + '/../../../spec_helper'
|
---|
| 2 | require File.dirname(__FILE__) + '/sample_archetype_spec'
|
---|
| 3 | require 'rexml/document'
|
---|
| 4 | include OpenEHR::Serializer
|
---|
| 5 |
|
---|
| 6 | describe XMLSerializer do
|
---|
| 7 | it_should_behave_like 'sample archetype'
|
---|
| 8 |
|
---|
| 9 | before(:each) do
|
---|
| 10 | @xml_serializer = XMLSerializer.new(@archetype)
|
---|
| 11 | end
|
---|
| 12 |
|
---|
| 13 | it 'should be an instance of XMLSerializer' do
|
---|
| 14 | @xml_serializer.should be_an_instance_of XMLSerializer
|
---|
| 15 | end
|
---|
| 16 |
|
---|
| 17 | it 'should return XML formatted header' do
|
---|
| 18 | @xml_serializer.header.should == <<END
|
---|
| 19 | <archetype_id>
|
---|
[407] | 20 | <value>openEHR-EHR-SECTION.test.v1</value>
|
---|
[406] | 21 | </archetype_id>
|
---|
| 22 | <concept>at0000</concept>
|
---|
[407] | 23 | <original_language>
|
---|
| 24 | <code_string>ja</code_string>
|
---|
| 25 | <terminology_id>
|
---|
| 26 | <value>openEHR</value>
|
---|
| 27 | </terminology_id>
|
---|
| 28 | </original_language>
|
---|
[406] | 29 | END
|
---|
| 30 | end
|
---|
| 31 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.