"{ Package: 'stx:goodies/sunit' }"
Object subclass:#TestSuite
instanceVariableNames:'name tests'
classVariableNames:''
poolDictionaries:''
category:'SUnit-Base'
!
!TestSuite methodsFor:'Accessing'!
addTest: aTest
self tests add: aTest
!
addTests: aCollection
aCollection do: [:eachTest | self addTest: eachTest]
!
name
^ name ? 'a TestSuite'.
!
name:aString
name := aString
!
tests
tests isNil ifTrue: [tests := OrderedCollection new].
^tests
! !
!TestSuite methodsFor:'Dependencies'!
addDependentToHierachy: anObject
self addDependent: anObject.
self tests do: [:each | each addDependentToHierachy: anObject]
"Modified: / 21.6.2000 / 10:13:35 / Sames"
!
removeDependentFromHierachy: anObject
self removeDependent: anObject.
self tests do: [:each | each removeDependentFromHierachy: anObject]
"Modified: / 21.6.2000 / 10:13:27 / Sames"
! !
!TestSuite methodsFor:'Running'!
run
| result |
result := TestResult new.
self run: result.
^result
!
run: aResult
self tests do:
[:each |
self changed: each.
each run: aResult]
"Modified: / 21.6.2000 / 10:14:01 / Sames"
!
run: aResult afterEachDo:block2
self tests do:
[:each |
self changed: each.
each run: aResult.
block2 value:each value:aResult
]
"Modified: / 21.6.2000 / 10:14:01 / Sames"
! !
!TestSuite class methodsFor:'documentation'!
version
^ '$Header: /cvs/stx/stx/goodies/sunit/TestSuite.st,v 1.6 2001-12-04 09:06:44 cg Exp $'
! !