|
1 " |
|
2 stx:goodies/smallsense - A productivity plugin for Smalltalk/X IDE |
|
3 Copyright (C) 2013-2014 Jan Vrany |
|
4 |
|
5 This library is free software; you can redistribute it and/or |
|
6 modify it under the terms of the GNU Lesser General Public |
|
7 License as published by the Free Software Foundation; either |
|
8 version 2.1 of the License. |
|
9 |
|
10 This library is distributed in the hope that it will be useful, |
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 Lesser General Public License for more details. |
|
14 |
|
15 You should have received a copy of the GNU Lesser General Public |
|
16 License along with this library; if not, write to the Free Software |
|
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
18 " |
|
19 "{ Package: 'stx:goodies/smallsense' }" |
|
20 |
|
21 "{ NameSpace: SmallSense }" |
|
22 |
|
23 Smalltalk::TestCase subclass:#EditSupportTests |
|
24 instanceVariableNames:'codeView codeViewInteractor editService editSupport' |
|
25 classVariableNames:'' |
|
26 poolDictionaries:'' |
|
27 category:'SmallSense-Tests' |
|
28 ! |
|
29 |
|
30 !EditSupportTests class methodsFor:'documentation'! |
|
31 |
|
32 copyright |
|
33 " |
|
34 stx:goodies/smallsense - A productivity plugin for Smalltalk/X IDE |
|
35 Copyright (C) 2013-2014 Jan Vrany |
|
36 |
|
37 This library is free software; you can redistribute it and/or |
|
38 modify it under the terms of the GNU Lesser General Public |
|
39 License as published by the Free Software Foundation; either |
|
40 version 2.1 of the License. |
|
41 |
|
42 This library is distributed in the hope that it will be useful, |
|
43 but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
44 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
45 Lesser General Public License for more details. |
|
46 |
|
47 You should have received a copy of the GNU Lesser General Public |
|
48 License along with this library; if not, write to the Free Software |
|
49 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
50 " |
|
51 ! ! |
|
52 |
|
53 !EditSupportTests methodsFor:'accessing-classes'! |
|
54 |
|
55 editSupportClass |
|
56 self subclassResponsibility |
|
57 |
|
58 "Created: / 23-07-2014 / 07:15:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
59 ! ! |
|
60 |
|
61 !EditSupportTests methodsFor:'running'! |
|
62 |
|
63 setUp |
|
64 | topView | |
|
65 |
|
66 topView := StandardSystemView new. |
|
67 topView extent: 320 @ 200. |
|
68 topView label: self printString. |
|
69 codeView := Tools::CodeView2 origin: 0.0@0.0 extent: 1.0@1.0 in: topView. |
|
70 codeViewInteractor := codeView interactor. |
|
71 |
|
72 editService := EditService new. |
|
73 editSupport := self editSupportClass new. |
|
74 codeView services: (Array with: editService). |
|
75 codeView language: editSupport language. |
|
76 editService updateSupport: editSupport. |
|
77 |
|
78 topView open. |
|
79 topView waitUntilVisible. |
|
80 |
|
81 "Created: / 23-07-2014 / 07:15:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
82 "Modified: / 23-07-2014 / 09:58:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
83 ! |
|
84 |
|
85 tearDown |
|
86 |
|
87 editService := nil. |
|
88 editSupport := nil. |
|
89 codeView topView destroy. |
|
90 |
|
91 "Created: / 23-07-2014 / 07:17:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
92 ! ! |
|
93 |