Sha256: 6c9f963df3bd3dff17d2c2dbc582550b3ef084bad537348826cccf43d2155d7e

Contents?: true

Size: 1.85 KB

Versions: 26

Compression:

Stored size: 1.85 KB

Contents

require File.dirname(__FILE__) + '/../../../../../spec_helper'
include OpenEHR::RM::Common::Archetyped
include OpenEHR::RM::Common::Generic
include OpenEHR::RM::DataTypes::Quantity::DateTime

describe FeederAuditDetails do
  before(:each) do
    provider = stub(PartyIdentified, :name => 'NERV')
    location = stub(PartyIdentified, :name => '3rd Tokyo')
    time = stub(DvDateTime, :value => '2009-09-28T19:40')
    subject = stub(PartyProxy, :type => 'PARTY')
    @feeder_audit_details =
      FeederAuditDetails.new(:system_id => 'MELCHIOR',
                             :provider => provider,
                             :location => location,
                             :time => time,
                             :subject => subject,
                             :version_id => '0.5.0')
  end

  it 'should be an instance of FeederAuditDetails' do
    @feeder_audit_details.should be_an_instance_of FeederAuditDetails
  end

  it 'system_id should be MELCHIOR' do
    @feeder_audit_details.system_id.should == 'MELCHIOR'
  end

  it 'provider.name should be NERV' do
    @feeder_audit_details.provider.name.should == 'NERV'
  end

  it 'location.name should be 3rd Tokyo' do
    @feeder_audit_details.location.name.should == '3rd Tokyo'
  end

  it 'time.value should be 2009-09-28T19:40' do
    @feeder_audit_details.time.value.should == '2009-09-28T19:40'
  end

  it 'subject.type should be PARTY' do
    @feeder_audit_details.subject.type.should == 'PARTY'
  end

  it 'version_id should be 0.5.0' do
    @feeder_audit_details.version_id.should == '0.5.0'
  end

  it 'should reise ArgumentError with nil system_id' do
    lambda {
      @feeder_audit_details.system_id = nil
    }.should raise_error ArgumentError
  end

  it 'should raise ArgumentError with empty syste_id' do
    lambda {
      @feeder_audit_details.system_id = ''
    }.should raise_error ArgumentError
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
openehr-1.2.8 spec/lib/openehr/rm/common/archetyped/feeder_audit_details_spec.rb
openehr-1.2.7 spec/lib/openehr/rm/common/archetyped/feeder_audit_details_spec.rb
openehr-1.2.6 spec/lib/openehr/rm/common/archetyped/feeder_audit_details_spec.rb
openehr-1.2.5 spec/lib/openehr/rm/common/archetyped/feeder_audit_details_spec.rb
openehr-1.2.4 spec/lib/openehr/rm/common/archetyped/feeder_audit_details_spec.rb
openehr-1.2.3 spec/lib/openehr/rm/common/archetyped/feeder_audit_details_spec.rb
openehr-1.2.2 spec/lib/openehr/rm/common/archetyped/feeder_audit_details_spec.rb
openehr-1.2.1 spec/lib/openehr/rm/common/archetyped/feeder_audit_details_spec.rb
openehr-1.2.0 spec/lib/openehr/rm/common/archetyped/feeder_audit_details_spec.rb
openehr-1.1.6 spec/lib/openehr/rm/common/archetyped/feeder_audit_details_spec.rb
openehr-1.1.5 spec/lib/openehr/rm/common/archetyped/feeder_audit_details_spec.rb
openehr-1.1.4 spec/lib/openehr/rm/common/archetyped/feeder_audit_details_spec.rb
openehr-1.1.3 spec/lib/openehr/rm/common/archetyped/feeder_audit_details_spec.rb
openehr-1.1.2 spec/lib/openehr/rm/common/archetyped/feeder_audit_details_spec.rb
openehr-1.1.1 spec/lib/openehr/rm/common/archetyped/feeder_audit_details_spec.rb
openehr-1.1.0 spec/lib/openehr/rm/common/archetyped/feeder_audit_details_spec.rb
open_ehr-1.0.2 spec/lib/open_ehr/rm/common/archetyped/feeder_audit_details_spec.rb
open_ehr-1.0.1 spec/lib/open_ehr/rm/common/archetyped/feeder_audit_details_spec.rb
open_ehr-1.0.0 spec/lib/open_ehr/rm/common/archetyped/feeder_audit_details_spec.rb
open_ehr-0.9.5 spec/lib/open_ehr/rm/common/archetyped/feeder_audit_details_spec.rb