SmallSense__EditSupportTests.st
changeset 257 623cefc35e2e
child 273 404662b42ddf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SmallSense__EditSupportTests.st	Thu Jul 24 10:27:44 2014 +0100
@@ -0,0 +1,93 @@
+"
+stx:goodies/smallsense - A productivity plugin for Smalltalk/X IDE
+Copyright (C) 2013-2014 Jan Vrany
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License. 
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+"
+"{ Package: 'stx:goodies/smallsense' }"
+
+"{ NameSpace: SmallSense }"
+
+Smalltalk::TestCase subclass:#EditSupportTests
+	instanceVariableNames:'codeView codeViewInteractor editService editSupport'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'SmallSense-Tests'
+!
+
+!EditSupportTests class methodsFor:'documentation'!
+
+copyright
+"
+stx:goodies/smallsense - A productivity plugin for Smalltalk/X IDE
+Copyright (C) 2013-2014 Jan Vrany
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License. 
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+"
+! !
+
+!EditSupportTests methodsFor:'accessing-classes'!
+
+editSupportClass
+    self subclassResponsibility
+
+    "Created: / 23-07-2014 / 07:15:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!EditSupportTests methodsFor:'running'!
+
+setUp
+    | topView |
+
+    topView := StandardSystemView new.
+    topView extent: 320 @ 200.
+    topView label: self printString.
+    codeView := Tools::CodeView2 origin: 0.0@0.0 extent: 1.0@1.0 in: topView.
+    codeViewInteractor := codeView interactor.
+
+    editService := EditService new.
+    editSupport := self editSupportClass new.
+    codeView services: (Array with: editService).
+    codeView language: editSupport language.
+    editService updateSupport: editSupport.
+
+    topView open.
+    topView waitUntilVisible.
+
+    "Created: / 23-07-2014 / 07:15:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 23-07-2014 / 09:58:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+tearDown
+
+    editService := nil.
+    editSupport := nil.
+    codeView topView destroy.
+
+    "Created: / 23-07-2014 / 07:17:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+