TestSuite.st
author Claus Gittinger <cg@exept.de>
Tue, 04 Sep 2001 15:07:08 +0200
changeset 32 77f76ea3a7ef
parent 14 a4a5478621e3
child 37 6da5b7e8e3ab
permissions -rw-r--r--
*** empty log message ***

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

Object subclass:#TestSuite
	instanceVariableNames:'tests'
	classVariableNames:''
	poolDictionaries:''
	category:'SUnit-Base'
!


!TestSuite methodsFor:'Accessing'!

addTest: aTest
	self tests add: aTest
!

addTests: aCollection 
	aCollection do: [:eachTest | self addTest: eachTest]
!

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"
! !

!TestSuite class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/goodies/sunit/TestSuite.st,v 1.4 2001-09-04 13:07:06 cg Exp $'
! !