SmallSense__SmalltalkCompletionEngineTests.st
author Claus Gittinger <cg@exept.de>
Mon, 15 Jul 2019 15:33:58 +0200
branchcvs_MAIN
changeset 1091 8c18b8f6ff0c
parent 258 1b0df5fb47b9
child 374 e65bd2bf892a
permissions -rw-r--r--
#OTHER by cg unneeded subProjects method removed (already inherited)

"{ Encoding: utf8 }"

"
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 }"

CompletionEngineTests subclass:#SmalltalkCompletionEngineTests
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'SmallSense-Tests'
!

!SmalltalkCompletionEngineTests 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
"
! !

!SmalltalkCompletionEngineTests methodsFor:'accessing-classes'!

completionEngineClass
    "superclass SmallSense::CompletionEngineTests says that I am responsible to implement this method"

    ^ SmalltalkCompletionEngine

    "Created: / 24-07-2014 / 11:51:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!SmalltalkCompletionEngineTests methodsFor:'tests - classes'!

test_classes_01a

    context codeView classHolder value: self class.
    context codeView codeAspect: #method. 
    self complete:'foo
    ^ SmalltalkCompletionEngineTe┃'.

    self assert: result notEmpty.
    self assert: (result select:[:each | each isSmallSenseClassPO and:[each klass == SmalltalkCompletionEngineTests]]) size == 1.

    "Created: / 24-07-2014 / 15:12:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

test_classes_01b

    context codeView classHolder value: self class.
    context codeView codeAspect: #method. 
    self complete:'foo
    ^ OrderedColl┃'.

    self assert: result notEmpty.
    self assert: (result select:[:each | each isSmallSenseClassPO and:[each klass == OrderedCollection]]) size == 1.

    "Created: / 24-07-2014 / 15:12:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

test_classes_01c

    context codeView classHolder value: self class.
    context codeView codeAspect: #method. 
    self complete:'foo
    ^ OperatingSyst┃'.

    self assert: result notEmpty.
    self assert: (result select:[:each | each isSmallSenseVariablePO and:[each name = 'OperatingSystem' ]]) size == 1.

    "Created: / 24-07-2014 / 15:14:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

test_classes_02a

    context codeView classHolder value: self class.
    context codeView codeAspect: #method. 
    self complete:'foo
    ^ Phase┃'.

    self assert: result notEmpty.
    self assert: (result select:[:each | each isSmallSenseClassPO and:[each klass = SmalltalkInferencer::Phase1 ]]) size == 1.

    "Created: / 24-07-2014 / 17:50:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

test_classes_02b

    context codeView classHolder value: self class.
    context codeView codeAspect: #method. 
    self complete:'foo
    ^ SmalltalkInfe┃'.

    self assert: result notEmpty.
    self assert: (result select:[:each | each isSmallSenseClassPO and:[each klass = SmalltalkInferencer::Phase1 ]]) size == 1.

    "Created: / 24-07-2014 / 17:50:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

test_classes_03

    context codeView classHolder value: self class.
    context codeView codeAspect: #method. 
    self complete:'foo
    ^ ClassL┃'.

    self assert: result notEmpty.
    self assert: (result select:[:each | each isSmallSenseClassPO and:[each klass = Tools::ClassList ]]) size == 1.

    "Created: / 24-07-2014 / 17:53:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

test_classes_04

    context codeView classHolder value: SmalltalkInferencer.
    context codeView codeAspect: #method. 
    self complete:'foo
    ^ Pha┃'.

    self assert: result notEmpty.
    self assert: (result select:[:each | each isSmallSenseClassPO and:[each klass = SmalltalkInferencer::Phase1 ]]) size == 1.
    self assert: (result select:[:each | each isSmallSenseClassPO and:[each klass = SmalltalkInferencer::Phase2 ]]) size == 1.

    "Created: / 24-07-2014 / 19:10:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

test_classes_05

    context codeView classHolder value: SmalltalkInferencer.
    context codeView codeAspect: #method. 
    self complete:'foo
    ^ Scree┃'.

    self assert: result notEmpty.
    self assert: (result select:[:each | each isSmallSenseVariablePO and:[each name = 'Screen' ]]) size == 1.

    "Created: / 24-07-2014 / 19:54:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !