ExampleTestResource.st
author Claus Gittinger <cg@exept.de>
Sun, 01 Jul 2018 12:52:19 +0200
changeset 719 2c96860ad5cb
parent 222 8e6f482297fa
child 611 1eecc860f4a5
child 664 e31b2e7b658d
permissions -rw-r--r--
#FEATURE by cg class: TestCase::Should class definition added: #assertSelector #beInstanceOf: #equal: #not #raise: changed: #be:

"{ Package: 'stx:goodies/sunit' }"

TestResource subclass:#ExampleTestResource
	instanceVariableNames:'runningState'
	classVariableNames:''
	poolDictionaries:''
	category:'SUnit-Tests'
!


!ExampleTestResource class methodsFor:'testing'!

isAvailable

	^super isAvailable and: [self current isStarted]
! !

!ExampleTestResource methodsFor:'accessing'!

runningState

	^runningState
!

runningState: aSymbol

	runningState := aSymbol
! !

!ExampleTestResource methodsFor:'constants'!

startedStateSymbol

	^#started
!

stoppedStateSymbol

	^#stopped
! !

!ExampleTestResource methodsFor:'running'!

setUp

	self runningState: self startedStateSymbol
!

tearDown

	self runningState: self stoppedStateSymbol
! !

!ExampleTestResource methodsFor:'testing'!

isAvailable

	^self runningState == self startedStateSymbol
!

isStarted

	^self runningState == self startedStateSymbol
!

isStopped

	^self runningState == self stoppedStateSymbol
! !

!ExampleTestResource class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/goodies/sunit/ExampleTestResource.st,v 1.3 2011-06-29 19:15:49 cg Exp $'
!

version_SVN
    ^ '§Id: ExampleTestResource.st 182 2009-12-05 18:12:17Z vranyj1 §'
! !