46
|
1 |
"{ Package: 'stx:goodies/sunit' }"
|
|
2 |
|
|
3 |
TestResource subclass:#ExampleTestResource
|
|
4 |
instanceVariableNames:'runningState'
|
|
5 |
classVariableNames:''
|
|
6 |
poolDictionaries:''
|
|
7 |
category:'SUnit-Tests'
|
|
8 |
!
|
|
9 |
|
|
10 |
|
68
|
11 |
!ExampleTestResource class methodsFor:'testing'!
|
46
|
12 |
|
|
13 |
isAvailable
|
|
14 |
|
|
15 |
^super isAvailable and: [self current isStarted]
|
|
16 |
! !
|
|
17 |
|
68
|
18 |
!ExampleTestResource methodsFor:'accessing'!
|
46
|
19 |
|
|
20 |
runningState
|
|
21 |
|
|
22 |
^runningState
|
|
23 |
!
|
|
24 |
|
|
25 |
runningState: aSymbol
|
|
26 |
|
|
27 |
runningState := aSymbol
|
|
28 |
! !
|
|
29 |
|
68
|
30 |
!ExampleTestResource methodsFor:'constants'!
|
46
|
31 |
|
|
32 |
startedStateSymbol
|
|
33 |
|
|
34 |
^#started
|
|
35 |
!
|
|
36 |
|
|
37 |
stoppedStateSymbol
|
|
38 |
|
|
39 |
^#stopped
|
|
40 |
! !
|
|
41 |
|
68
|
42 |
!ExampleTestResource methodsFor:'running'!
|
46
|
43 |
|
|
44 |
setUp
|
222
|
45 |
|
46
|
46 |
self runningState: self startedStateSymbol
|
|
47 |
!
|
|
48 |
|
|
49 |
tearDown
|
|
50 |
|
|
51 |
self runningState: self stoppedStateSymbol
|
|
52 |
! !
|
|
53 |
|
68
|
54 |
!ExampleTestResource methodsFor:'testing'!
|
46
|
55 |
|
|
56 |
isAvailable
|
222
|
57 |
|
46
|
58 |
^self runningState == self startedStateSymbol
|
|
59 |
!
|
|
60 |
|
|
61 |
isStarted
|
222
|
62 |
|
46
|
63 |
^self runningState == self startedStateSymbol
|
|
64 |
!
|
|
65 |
|
|
66 |
isStopped
|
222
|
67 |
|
46
|
68 |
^self runningState == self stoppedStateSymbol
|
|
69 |
! !
|
|
70 |
|
|
71 |
!ExampleTestResource class methodsFor:'documentation'!
|
|
72 |
|
|
73 |
version
|
222
|
74 |
^ '$Header: /cvs/stx/stx/goodies/sunit/ExampleTestResource.st,v 1.3 2011-06-29 19:15:49 cg Exp $'
|
|
75 |
!
|
|
76 |
|
|
77 |
version_SVN
|
|
78 |
^ '§Id: ExampleTestResource.st 182 2009-12-05 18:12:17Z vranyj1 §'
|
46
|
79 |
! !
|