-
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.
- Loading branch information
1 parent
03ffc3a
commit cc943ba
Showing
3 changed files
with
68 additions
and
13 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
43 changes: 43 additions & 0 deletions
43
repository/OpenPonk-Roassal/OPRSDraggableCPControllerTest.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
Class { | ||
#name : #OPRSDraggableCPControllerTest, | ||
#superclass : #TestCase, | ||
#instVars : [ | ||
'controller', | ||
'boxFrom', | ||
'selfLine' | ||
], | ||
#category : #'OpenPonk-Roassal-Tests' | ||
} | ||
|
||
{ #category : #running } | ||
OPRSDraggableCPControllerTest >> setUp [ | ||
|
||
super setUp. | ||
|
||
boxFrom := RSBox new. | ||
selfLine := RSPolyline new. | ||
controller := OPRSDraggableCPController new. | ||
selfLine controlPointsController: controller. | ||
selfLine | ||
from: boxFrom; | ||
to: boxFrom | ||
] | ||
|
||
{ #category : #tests } | ||
OPRSDraggableCPControllerTest >> testSelfLoopInitial [ | ||
|
||
selfLine update. | ||
self assert: selfLine controlPoints size equals: 5 | ||
] | ||
|
||
{ #category : #tests } | ||
OPRSDraggableCPControllerTest >> testSelfLoopPreset [ | ||
|
||
selfLine controlPoints: { | ||
boxFrom encompassingRectangle topCenter. | ||
(boxFrom encompassingRectangle topCenter - (0 @ 100)). | ||
(boxFrom encompassingRectangle rightCenter + (100 @ 0)). | ||
boxFrom encompassingRectangle rightCenter }. | ||
selfLine update. | ||
self assert: selfLine controlPoints size equals: 4 | ||
] |
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