Skip to content

Commit

Permalink
Test removal of class attribute from association
Browse files Browse the repository at this point in the history
  • Loading branch information
JanBliznicenko committed Nov 23, 2024
1 parent eb38582 commit dab7b13
Showing 1 changed file with 34 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,37 @@ OPUmlAssociationControllerTest >> modelClass [
^ OPUMLAssociation
]

{ #category : 'tests - diagram' }
OPUmlAssociationControllerTest >> testNavigableRemovalOfAssociationRemovesMemberEnds [

| first second attributeController attributeDiagramElement |
self showInDiagram.
first := model memberEnds first.
second := model memberEnds second.
self deny: (diagramController isVisibleInDiagram: second).
controller writeNavigability: true to: second.
diagramController showInDiagramModel: second.
self assert: (diagramController isVisibleInDiagram: second).
attributeController := diagramController controllerForModel: second.
self
assert: attributeController class
equals: OPUmlAttributeController.
attributeDiagramElement := attributeController diagramElement.
self
assert: attributeDiagramElement class
equals: OPUmlAttributeLabel.
self assert: attributeDiagramElement isRendered.
self
assertCollection: diagramController diagram allOwnedElements
includesAny: { attributeDiagramElement }.
controller removeControllerAndModel.
self deny: (diagramController isVisibleInDiagram: controller).
self deny: (diagramController isVisibleInDiagram: second).
self
denyCollection: diagramController diagram allOwnedElements
includesAny: { attributeDiagramElement }
]

{ #category : 'tests - diagram' }
OPUmlAssociationControllerTest >> testRemovalOfAssociationRemovesMemberEnds [

Expand All @@ -32,7 +63,9 @@ OPUmlAssociationControllerTest >> testRemovalOfAssociationRemovesMemberEnds [
removeControllerAndModel.
(diagramController controllerForModel: targetModel)
removeControllerAndModel.
self assert: diagramController controllers asArray equals: #( )
self
assertCollection: diagramController controllers
hasSameElements: #( )
]

{ #category : 'tests' }
Expand Down

0 comments on commit dab7b13

Please sign in to comment.