ExampleTestResource.st
author Claus Gittinger <cg@exept.de>
Thu, 13 Dec 2001 22:47:44 +0100
changeset 46 eb19d69beb10
child 68 9fd111438d60
permissions -rw-r--r--
initial checkin
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
46
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"{ Package: 'stx:goodies/sunit' }"
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
TestResource subclass:#ExampleTestResource
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
	instanceVariableNames:'runningState'
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
	classVariableNames:''
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
	poolDictionaries:''
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
	category:'SUnit-Tests'
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
!
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
!ExampleTestResource class methodsFor:'Testing'!
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
isAvailable
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
	^super isAvailable and: [self current isStarted]
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
! !
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
!ExampleTestResource methodsFor:'Accessing'!
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
runningState
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
	^runningState
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
!
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
runningState: aSymbol
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
	runningState := aSymbol
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
! !
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
!ExampleTestResource methodsFor:'Constants'!
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
startedStateSymbol
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
	^#started
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
!
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
stoppedStateSymbol
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
	^#stopped
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
! !
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
!ExampleTestResource methodsFor:'Running'!
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
setUp
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
	
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
	self runningState: self startedStateSymbol
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
!
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
tearDown
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
	self runningState: self stoppedStateSymbol
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
! !
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
!ExampleTestResource methodsFor:'Testing'!
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
isAvailable
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
	
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
	^self runningState == self startedStateSymbol
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
!
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
isStarted
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
	
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
	^self runningState == self startedStateSymbol
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
!
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
isStopped
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
	
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
	^self runningState == self stoppedStateSymbol
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
! !
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
!ExampleTestResource class methodsFor:'documentation'!
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
version
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
    ^ '$Header: /cvs/stx/stx/goodies/sunit/ExampleTestResource.st,v 1.1 2001-12-13 21:47:44 cg Exp $'
eb19d69beb10 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
! !