Sha256: 717efb5a046d72c698b20bcdb8fa3c92c8916ac5083722d69fa42ba2ed979668
Contents?: true
Size: 1.62 KB
Versions: 17
Compression:
Stored size: 1.62 KB
Contents
require File.dirname(__FILE__) + '/../../../../../spec_helper' include OpenEHR::RM::DataStructures::History include OpenEHR::RM::DataStructures::ItemStructure include OpenEHR::RM::DataTypes::Text include OpenEHR::RM::DataTypes::Quantity::DateTime describe IntervalEvent do before(:each) do time = DvDateTime.new(:value => '2009-11-12T10:19:33Z') state = stub(ItemStructure, :archetype_node_id => 'at0002') origin = DvDateTime.new(:value => '2009-11-11T10:20:40Z') parent = stub(History, :origin => origin) math_function = stub(DvCodedText, :value => 'mean') width = DvDuration.new(:value => 'P0Y2M1W3DT5H7M3S') @interval_event = IntervalEvent.new(:archetype_node_id => 'at0001', :name => DvText.new(:value => 'Event test'), :time => time, :data => 'data', :width => width, :math_function => math_function, :sample_count => 1234) end it 'should be an instance of IntervalEvent' do @interval_event.should be_an_instance_of IntervalEvent end it 'width should be assigned properly' do @interval_event.width.value.should == 'P0Y2M1W3DT5H7M3S' end it 'math_function should be assigned properly' do @interval_event.math_function.value.should == 'mean' end it 'sample_count should be assigned properly' do @interval_event.sample_count.should be_equal 1234 end it 'should subtract time for interval start time' do @interval_event.interval_start_time.value.should == '2009-09-09T05:12:30Z' end end
Version data entries
17 entries across 17 versions & 2 rubygems