Changeset 322 for ruby/branches/0.5/spec


Ignore:
Timestamp:
Oct 18, 2009, 8:14:21 PM (15 years ago)
Author:
KOBAYASHI, Shinji
Message:

common/generic near completed

Location:
ruby/branches/0.5/spec/lib/open_ehr/rm
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • ruby/branches/0.5/spec/lib/open_ehr/rm/common/generic/audit_details_spec.rb

    r312 r322  
    3737    @audit_details.description.value.should == 'test environment'
    3838  end
     39
     40  it 'should raise ArgumentError when system_id was assigned nil' do
     41    lambda {
     42      @audit_details.system_id = nil
     43    }.should raise_error ArgumentError
     44  end
     45
     46  it 'should raise ArgumentError when time_commited is nil' do
     47    lambda {
     48      @audit_details.time_committed = nil
     49    }.should raise_error ArgumentError
     50  end
    3951end
  • ruby/branches/0.5/spec/lib/open_ehr/rm/common/generic/party_identified_spec.rb

    r312 r322  
    2626    @party_identified.identifier.size.should be_equal 5
    2727  end
     28
     29  it 'should raise ArgumentError with all nil' do
     30    lambda {
     31      PartyIdentified.new
     32    }.should raise_error ArgumentError
     33  end
     34
     35  it 'should raise ArgumentError with nil name when ex_r and id nil' do
     36    @party_identified.identifier = nil
     37    @party_identified.external_ref = nil
     38    lambda {
     39      @party_identified.name = nil
     40    }.should raise_error ArgumentError
     41  end
     42
     43  it 'should raise ArgumentError with nil external_ref when name and id nil' do
     44    @party_identified.name = nil
     45    @party_identified.identifier = nil
     46    lambda {
     47      @party_identified.external_ref = nil
     48    }.should raise_error ArgumentError
     49  end
     50
     51  it 'should raise ArgumentError with nil identifier when name and ex_r nil' do
     52    @party_identified.name = nil
     53    @party_identified.external_ref = nil
     54    lambda {
     55      @party_identified.identifier = nil
     56    }.should raise_error ArgumentError
     57  end
     58
     59  it 'should raise ArgumentError with empty identifier' do
     60    lambda {
     61      @party_identified.identifier = Array.new
     62    }.should raise_error ArgumentError
     63  end
    2864end
  • ruby/branches/0.5/spec/lib/open_ehr/rm/common/generic/party_related_spec.rb

    r312 r322  
    11require File.dirname(__FILE__) + '/../../../../../spec_helper'
    22include OpenEHR::RM::Common::Generic
    3 
     3include OpenEHR::RM::DataTypes::Text
    44describe PartyRelated do
    55  before(:each) do
Note: See TracChangeset for help on using the changeset viewer.