Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/xmi/uml/owned_comment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ class OwnedComment < Base
attribute :body_element, :string
attribute :body_attribute, :string
attribute :annotated_attribute, :string
attribute :annotated_element, AnnotatedElement
attribute :annotated_element, AnnotatedElement, collection: true

xml do
root "ownedComment"
map_attribute "name", to: :name
map_attribute "body", to: :body_attribute
map_attribute "annotatedElement", to: :annotated_attribute

map_element "annotatedElement", to: :annotated_element
map_element "annotatedElement", to: :annotated_element,
value_map: VALUE_MAP
map_element "body", to: :body_element
end
end
Expand Down
4 changes: 2 additions & 2 deletions lib/xmi/uml/owned_element.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class OwnedElement < ::Xmi::UmlDi::Base
attribute :bounds, Bounds, collection: true
attribute :source, :string
attribute :target, :string
attribute :waypoint, Waypoint
attribute :waypoint, Waypoint, collection: true

xml do
root "ownedElement"
Expand All @@ -23,7 +23,7 @@ class OwnedElement < ::Xmi::UmlDi::Base
map_element "bounds", to: :bounds, value_map: VALUE_MAP
map_element "source", to: :source
map_element "target", to: :target
map_element "waypoint", to: :waypoint
map_element "waypoint", to: :waypoint, value_map: VALUE_MAP
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/xmi/sparx/sparx_root_xmi2013_uml2013_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
expect(xmi_root_model.model).to be_instance_of(Xmi::Uml::UmlModel)
expect(xmi_root_model.model.name).to eq("EA_Model")
expect(xmi_root_model.model.packaged_element).to be_instance_of(Array)
expect(xmi_root_model.model.packaged_element.first).to be_instance_of(Xmi::Uml::PackagedElement)
expect(xmi_root_model.model.packaged_element.first).to be_instance_of(Xmi::Uml::Package)
expect(xmi_root_model.model.packaged_element.first.name).to eq("requirement type class diagram")
end

Expand Down
4 changes: 2 additions & 2 deletions spec/xmi/sparx/sparx_root_xmi_parsing_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
expect(xmi_root_model.model).to be_instance_of(Xmi::Uml::UmlModel)
expect(xmi_root_model.model.name).to eq("EA_Model")
expect(xmi_root_model.model.packaged_element).to be_instance_of(Array)
expect(xmi_root_model.model.packaged_element.first).to be_instance_of(Xmi::Uml::PackagedElement)
expect(xmi_root_model.model.packaged_element.first).to be_instance_of(Xmi::Uml::Package)
expect(xmi_root_model.model.packaged_element.first.name).to eq("requirement type class diagram")
end

Expand Down Expand Up @@ -76,7 +76,7 @@
expect(xmi_root_model.model).to be_instance_of(Xmi::Uml::UmlModel)
expect(xmi_root_model.model.name).to eq("EA_Model")
expect(xmi_root_model.model.packaged_element).to be_instance_of(Array)
expect(xmi_root_model.model.packaged_element.first).to be_instance_of(Xmi::Uml::PackagedElement)
expect(xmi_root_model.model.packaged_element.first).to be_instance_of(Xmi::Uml::Package)
expect(xmi_root_model.model.packaged_element.first.name).to eq("ISO 6709 Edition 2")
end

Expand Down
2 changes: 1 addition & 1 deletion spec/xmi/uml/interface_realization_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@

it "is not present in current Sparx EA fixture output" do
ea_fixture = cached_fixture("ea-xmi-2.5.1.xmi")
expect(ea_fixture).not_to match(/<interfaceRealization/)
expect(ea_fixture).not_to include("<interfaceRealization")
end
end
end
Loading