Skip to content

Commit

Permalink
reworked dependency showing and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JanBliznicenko committed Jul 4, 2024
1 parent 577445e commit c042476
Show file tree
Hide file tree
Showing 25 changed files with 189 additions and 443 deletions.
5 changes: 0 additions & 5 deletions repository/OpenPonk-BPMN/OPBPMNActivityController.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ OPBPMNActivityController >> canBeTargetFor: aController [
]
]

{ #category : 'accessing' }
OPBPMNActivityController >> dependentElements [
^ (model incoming , model outgoing) asSet
]

{ #category : 'connecting' }
OPBPMNActivityController >> diagramElementClass [

Expand Down
16 changes: 8 additions & 8 deletions repository/OpenPonk-BPMN/OPBPMNActivityControllerTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ OPBPMNActivityControllerTest >> controllerClass [
]

{ #category : 'accessing' }
OPBPMNActivityControllerTest >> diagramElementClass [
^ OPBPMNActivityShape
OPBPMNActivityControllerTest >> creationTargetControllerClass [
^ OPBPMNPoolController
]

{ #category : 'accessing' }
OPBPMNActivityControllerTest >> modelClass [
^ OPBPMNActivityModel
OPBPMNActivityControllerTest >> creationTargetModelClass [
^ OPBPMNPoolModel
]

{ #category : 'accessing' }
OPBPMNActivityControllerTest >> targetControllerClass [
^ OPBPMNPoolController
OPBPMNActivityControllerTest >> diagramElementClass [
^ OPBPMNActivityShape
]

{ #category : 'accessing' }
OPBPMNActivityControllerTest >> targetModelClass [
^ OPBPMNPoolModel
OPBPMNActivityControllerTest >> modelClass [
^ OPBPMNActivityModel
]
33 changes: 0 additions & 33 deletions repository/OpenPonk-BPMN/OPBPMNBasicFlowControllerTest.class.st

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,6 @@ OPBPMNBoundaryEventController >> modelClass [
^ OPBPMNBoundaryEventModel
]

{ #category : 'forms' }
OPBPMNBoundaryEventController >> removeModel [

self diagramController model remove: self model
]

{ #category : 'forms' }
OPBPMNBoundaryEventController >> subscribeDiagram: aDiagram [

Expand Down
16 changes: 8 additions & 8 deletions repository/OpenPonk-BPMN/OPBPMNBoundaryEventTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ OPBPMNBoundaryEventTest >> controllerClass [
]

{ #category : 'accessing' }
OPBPMNBoundaryEventTest >> diagramElementClass [
^ OPBPMNBoundaryEventShape
OPBPMNBoundaryEventTest >> creationTargetControllerClass [
^ OPBPMNSubProcessController
]

{ #category : 'accessing' }
OPBPMNBoundaryEventTest >> modelClass [
^ OPBPMNBoundaryEventModel
OPBPMNBoundaryEventTest >> creationTargetModelClass [
^ OPBPMNSubProcessModel
]

{ #category : 'accessing' }
OPBPMNBoundaryEventTest >> targetControllerClass [
^ OPBPMNSubProcessController
OPBPMNBoundaryEventTest >> diagramElementClass [
^ OPBPMNBoundaryEventShape
]

{ #category : 'accessing' }
OPBPMNBoundaryEventTest >> targetModelClass [
^ OPBPMNSubProcessModel
OPBPMNBoundaryEventTest >> modelClass [
^ OPBPMNBoundaryEventModel
]

{ #category : 'accessing' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ OPBPMNCollapsedSubProcessController >> canBeTargetFor: aController [
]
]

{ #category : 'testing' }
OPBPMNCollapsedSubProcessController >> dependentElements [
^ (model incoming , model outgoing) asSet
]

{ #category : 'testing' }
OPBPMNCollapsedSubProcessController >> diagramElementClass [

Expand Down
16 changes: 8 additions & 8 deletions repository/OpenPonk-BPMN/OPBPMNCollapsedSubProcessTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ OPBPMNCollapsedSubProcessTest >> controllerClass [
]

{ #category : 'accessing' }
OPBPMNCollapsedSubProcessTest >> diagramElementClass [
^ OPBPMNCollapsedSubProcessShape
OPBPMNCollapsedSubProcessTest >> creationTargetControllerClass [
^ OPBPMNPoolController
]

{ #category : 'accessing' }
OPBPMNCollapsedSubProcessTest >> modelClass [
^ OPBPMNCollapsedSubProcessModel
OPBPMNCollapsedSubProcessTest >> creationTargetModelClass [
^ OPBPMNPoolModel
]

{ #category : 'accessing' }
OPBPMNCollapsedSubProcessTest >> targetControllerClass [
^ OPBPMNPoolController
OPBPMNCollapsedSubProcessTest >> diagramElementClass [
^ OPBPMNCollapsedSubProcessShape
]

{ #category : 'accessing' }
OPBPMNCollapsedSubProcessTest >> targetModelClass [
^ OPBPMNPoolModel
OPBPMNCollapsedSubProcessTest >> modelClass [
^ OPBPMNCollapsedSubProcessModel
]
92 changes: 0 additions & 92 deletions repository/OpenPonk-BPMN/OPBPMNControllerTest.class.st

This file was deleted.

30 changes: 3 additions & 27 deletions repository/OpenPonk-BPMN/OPBPMNDataFlowControllerTest.class.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Class {
#name : 'OPBPMNDataFlowControllerTest',
#superclass : 'OPBPMNFlowControllerTest',
#superclass : 'OPBPMNEdgeControllerTest',
#category : 'OpenPonk-BPMN-Tests',
#package : 'OpenPonk-BPMN',
#tag : 'Tests'
Expand All @@ -23,35 +23,11 @@ OPBPMNDataFlowControllerTest >> modelClass [
]

{ #category : 'accessing' }
OPBPMNDataFlowControllerTest >> targetControllerClass [
OPBPMNDataFlowControllerTest >> sourceControllerClass [
^ OPBPMNDataObjectController
]

{ #category : 'accessing' }
OPBPMNDataFlowControllerTest >> targetModelClass [
OPBPMNDataFlowControllerTest >> sourceModelClass [
^ OPBPMNDataObjectModel
]

{ #category : 'accessing' }
OPBPMNDataFlowControllerTest >> testCreateFigure [

| figure previousElementsSize |
controller
source: fromCtrl;
target: toCtrl;
model: model.
diagramController addController: controller.
previousElementsSize := diagramController canvas nodes size.
figure := controller
createDiagramElement;
renderDiagramElement.
self assert: figure class equals: OPRSPolyline.
self assert: figure from equals: fromCtrl roassalShape.
self assert: figure to equals: toCtrl roassalShape.
self
assert: diagramController canvas nodes size
equals: previousElementsSize + self amountOfLabels.
self assert: figure shape color equals: Color black.
self assert: figure shape markerEnd isNil.
self assert: figure shape markerStart isNil.
]
16 changes: 8 additions & 8 deletions repository/OpenPonk-BPMN/OPBPMNDataObjectTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ OPBPMNDataObjectTest >> controllerClass [
]

{ #category : 'accessing' }
OPBPMNDataObjectTest >> diagramElementClass [
^ OPBPMNDataObjectShape
OPBPMNDataObjectTest >> creationTargetControllerClass [
^ OPBPMNPoolController
]

{ #category : 'accessing' }
OPBPMNDataObjectTest >> modelClass [
^ OPBPMNDataObjectModel
OPBPMNDataObjectTest >> creationTargetModelClass [
^ OPBPMNPoolModel
]

{ #category : 'accessing' }
OPBPMNDataObjectTest >> targetControllerClass [
^ OPBPMNPoolController
OPBPMNDataObjectTest >> diagramElementClass [
^ OPBPMNDataObjectShape
]

{ #category : 'accessing' }
OPBPMNDataObjectTest >> targetModelClass [
^ OPBPMNPoolModel
OPBPMNDataObjectTest >> modelClass [
^ OPBPMNDataObjectModel
]
31 changes: 17 additions & 14 deletions repository/OpenPonk-BPMN/OPBPMNEdgeController.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,6 @@ OPBPMNEdgeController >> addLabels [
self constraintLabel: #name balance: 0.4 offset: 12
]

{ #category : 'construction' }
OPBPMNEdgeController >> createModelIn: aParentModel [
self model: self modelClass new.
model source: self source model.
model target: self target model.
source model addFlow: model.
target model addFlow: model.
"(aParentModel owner isKindOf: OPBPMNPoolModel)
ifTrue: [ (aParentModel owner) owner add: model ]
ifFalse: [ aParentModel owner add: model ]."
^ model
]

{ #category : 'construction' }
OPBPMNEdgeController >> diagramElementClass [
^ self subclassResponsibility
Expand Down Expand Up @@ -56,9 +43,25 @@ OPBPMNEdgeController >> modelClass [
^ self subclassResponsibility
]

{ #category : 'construction' }
OPBPMNEdgeController >> modelSource: aModel in: aParentModel [

(super modelSource: aModel in: aParentModel) ifFalse: [ ^ false ].
self modelSource addFlow: model.
^ true
]

{ #category : 'construction' }
OPBPMNEdgeController >> modelTarget: aModel in: aParentModel [

(super modelTarget: aModel in: aParentModel) ifFalse: [ ^ false ].
self modelTarget addFlow: model.
^ true
]

{ #category : 'private' }
OPBPMNEdgeController >> removeModel [
self diagramController model remove: self model.
self model owner remove: self model.
self model target removeFlow: self model.
self model source removeFlow: self model
]
Loading

0 comments on commit c042476

Please sign in to comment.