-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into release_base
- Loading branch information
Showing
134 changed files
with
1,737 additions
and
767 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 29 additions & 7 deletions
36
...penPonk-Core/OPAbstractShapeTest.class.st → ...ore/OPAbstractDiagramElementTest.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
Class { | ||
#name : 'OPAbstractNodeTest', | ||
#superclass : 'OPAbstractDiagramElementTest', | ||
#category : 'OpenPonk-Core-Tests', | ||
#package : 'OpenPonk-Core', | ||
#tag : 'Tests' | ||
} | ||
|
||
{ #category : 'tests' } | ||
OPAbstractNodeTest >> testDoesNotMoveOnShapeCreation [ | ||
|
||
| diagram originalRoassalPosition movedRoassalPosition newShape | | ||
diagram := OPDiagram new. | ||
diagram renderIn: canvas. | ||
shape owningElement: diagram. | ||
shape modelElement: model. | ||
shape renderIn: canvas. | ||
shape isPositionableByUser ifFalse: [ ^ self ]. | ||
originalRoassalPosition := shape roassalShape position. | ||
shape updateFromRender. | ||
self assert: shape bounds position equals: originalRoassalPosition. | ||
shape roassalShape translateBy: 100 @ 50. | ||
movedRoassalPosition := shape roassalShape position. | ||
self | ||
assert: movedRoassalPosition | ||
equals: originalRoassalPosition + (100 @ 50). | ||
self assert: shape bounds position equals: originalRoassalPosition. | ||
newShape := OPTestLabel in: diagram. | ||
newShape renderIn: canvas. | ||
self assert: shape bounds position equals: originalRoassalPosition. | ||
self assert: shape roassalShape position equals: movedRoassalPosition | ||
] | ||
|
||
{ #category : 'tests' } | ||
OPAbstractNodeTest >> testUpdateFromRender [ | ||
|
||
| originalBounds movedBounds | | ||
self assert: shape bounds equals: nil. | ||
shape modelElement: model. | ||
shape renderIn: canvas. | ||
shape updateFromRender. | ||
shape isPositionableByUser ifFalse: [ ^ self ]. | ||
originalBounds := shape bounds veryDeepCopy. | ||
shape roassalShape translateBy: 100 @ 50. | ||
self assert: shape bounds position equals: originalBounds position. | ||
shape updateFromRender. | ||
movedBounds := shape bounds veryDeepCopy. | ||
self deny: movedBounds position equals: originalBounds position. | ||
self assert: movedBounds position equals: originalBounds position + (100 @ 50). | ||
|
||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.