Last change
on this file since 397 was 369, checked in by KOBAYASHI, Shinji, 15 years ago |
merge from branches/0.5
|
File size:
1019 bytes
|
Line | |
---|
1 | require File.dirname(__FILE__) + '/../../../../spec_helper'
|
---|
2 | include OpenEHR::RM::Demographic
|
---|
3 | include OpenEHR::RM::DataTypes::Text
|
---|
4 | include OpenEHR::RM::DataStructures::ItemStructure
|
---|
5 |
|
---|
6 | describe PartyIdentity do
|
---|
7 | before(:each) do
|
---|
8 | name = DvText.new(:value => 'test')
|
---|
9 | details = stub(ItemStructure, :archetype_node_id => 'at0002')
|
---|
10 | @party_identity = PartyIdentity.new(:archetype_node_id => 'at0001',
|
---|
11 | :name => name,
|
---|
12 | :details => details)
|
---|
13 | end
|
---|
14 |
|
---|
15 | it 'should be an instance of PartyIdentity' do
|
---|
16 | @party_identity.should be_an_instance_of PartyIdentity
|
---|
17 | end
|
---|
18 |
|
---|
19 | it 'details should be assigned properly' do
|
---|
20 | @party_identity.details.archetype_node_id.should == 'at0002'
|
---|
21 | end
|
---|
22 |
|
---|
23 | it 'should raise ArgumentError with nil details' do
|
---|
24 | lambda {
|
---|
25 | @party_identity.details = nil
|
---|
26 | }.should raise_error ArgumentError
|
---|
27 | end
|
---|
28 |
|
---|
29 | it 'purpose should return as same as name' do
|
---|
30 | @party_identity.purpose.value.should == 'test'
|
---|
31 | end
|
---|
32 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.