Changeset 242


Ignore:
Timestamp:
Sep 2, 2009, 11:15:49 PM (11 years ago)
Author:
KOBAYASHI, Shinji
Message:

encapsulated finished

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ruby/branches/0.5/spec/lib/open_ehr/rm/data_types/encapsulated/dv_multimedia_spec.rb

    r241 r242  
    1111    uri = stub(DvUri, :value => 'http://openehr.jp/')
    1212    data = Array['123412', '123112']
     13    compression_algorithm = stub(CodePhrase, :code_string => 'gzip')
     14    integrity_check = Array['123456789ABCDEF','DEADBEEF']
     15    integrity_check_algorithm = stub(CodePhrase, :code_string => 'SHA-1')
     16    alternate_text = 'test'
    1317    @dv_multimedia = DvMultimedia.new(:value => '<xml>test</xml>',
    1418                                      :media_type => media_type,
    1519                                      :charset => charset,
    1620                                      :uri => uri,
    17                                       :data => data)
     21                                      :data => data,
     22                                      :compression_algorithm => compression_algorithm,
     23                                      :integrity_check => integrity_check,
     24                                      :integrity_check_algorithm => integrity_check_algorithm,
     25                                      :alternate_text => alternate_text)
    1826  end
    1927
     
    4553    @dv_multimedia.data[0].should == '123412'
    4654  end
     55
     56  it 's compression_algorithm should be gzip' do
     57    @dv_multimedia.compression_algorithm.code_string.should == 'gzip'
     58  end
     59
     60  it 's integrity_check[1] should be DEADBEEF' do
     61    @dv_multimedia.integrity_check[1].should == 'DEADBEEF'
     62  end
     63
     64  it 's integrity_check_algorithm should be SHA-1' do
     65    @dv_multimedia.integrity_check_algorithm.code_string.should == 'SHA-1'
     66  end
     67
     68  it 's alternate text should be test' do
     69    @dv_multimedia.alternate_text.should == 'test'
     70  end
     71
     72  it 'has_integrity_check should be true'
     73
     74  it 'is compressed should be true'
     75
     76  it 'is_external should be true'
     77
     78  it 'is_internal should be false'
    4779end
Note: See TracChangeset for help on using the changeset viewer.