author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Sun, 26 Nov 2017 20:40:34 +0000 | |
branch | jv |
changeset 696 | 268bf2c60556 |
parent 664 | e31b2e7b658d |
child 724 | 4dae63fce9f9 |
permissions | -rw-r--r-- |
46 | 1 |
"{ Package: 'stx:goodies/sunit' }" |
2 |
||
664
e31b2e7b658d
FIX: Do not treat skipped test as passed!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
222
diff
changeset
|
3 |
"{ NameSpace: Smalltalk }" |
e31b2e7b658d
FIX: Do not treat skipped test as passed!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
222
diff
changeset
|
4 |
|
46 | 5 |
TestResource subclass:#ExampleTestResource |
6 |
instanceVariableNames:'runningState' |
|
7 |
classVariableNames:'' |
|
8 |
poolDictionaries:'' |
|
9 |
category:'SUnit-Tests' |
|
10 |
! |
|
11 |
||
12 |
||
68 | 13 |
!ExampleTestResource class methodsFor:'testing'! |
46 | 14 |
|
15 |
isAvailable |
|
16 |
||
17 |
^super isAvailable and: [self current isStarted] |
|
18 |
! ! |
|
19 |
||
68 | 20 |
!ExampleTestResource methodsFor:'accessing'! |
46 | 21 |
|
22 |
runningState |
|
23 |
||
24 |
^runningState |
|
25 |
! |
|
26 |
||
27 |
runningState: aSymbol |
|
28 |
||
29 |
runningState := aSymbol |
|
30 |
! ! |
|
31 |
||
68 | 32 |
!ExampleTestResource methodsFor:'constants'! |
46 | 33 |
|
34 |
startedStateSymbol |
|
35 |
||
36 |
^#started |
|
37 |
! |
|
38 |
||
39 |
stoppedStateSymbol |
|
40 |
||
41 |
^#stopped |
|
42 |
! ! |
|
43 |
||
68 | 44 |
!ExampleTestResource methodsFor:'running'! |
46 | 45 |
|
46 |
setUp |
|
222 | 47 |
|
46 | 48 |
self runningState: self startedStateSymbol |
49 |
! |
|
50 |
||
51 |
tearDown |
|
52 |
||
53 |
self runningState: self stoppedStateSymbol |
|
54 |
! ! |
|
55 |
||
68 | 56 |
!ExampleTestResource methodsFor:'testing'! |
46 | 57 |
|
58 |
isAvailable |
|
222 | 59 |
|
46 | 60 |
^self runningState == self startedStateSymbol |
61 |
! |
|
62 |
||
63 |
isStarted |
|
222 | 64 |
|
46 | 65 |
^self runningState == self startedStateSymbol |
66 |
! |
|
67 |
||
68 |
isStopped |
|
222 | 69 |
|
46 | 70 |
^self runningState == self stoppedStateSymbol |
71 |
! ! |
|
72 |
||
73 |
!ExampleTestResource class methodsFor:'documentation'! |
|
74 |
||
75 |
version |
|
222 | 76 |
^ '$Header: /cvs/stx/stx/goodies/sunit/ExampleTestResource.st,v 1.3 2011-06-29 19:15:49 cg Exp $' |
77 |
! |
|
78 |
||
79 |
version_SVN |
|
80 |
^ '§Id: ExampleTestResource.st 182 2009-12-05 18:12:17Z vranyj1 §' |
|
46 | 81 |
! ! |
664
e31b2e7b658d
FIX: Do not treat skipped test as passed!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
222
diff
changeset
|
82 |