TestSuite.st
author Claus Gittinger <cg@exept.de>
Wed, 06 Dec 2000 16:25:04 +0100
changeset 6 78bb1397e43d
parent 0 9365d5753f11
child 14 a4a5478621e3
permissions -rw-r--r--
added rerun-defect tests; fixed button enable bug

"{ 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 sunitAddDependent: anObject.
	self tests do: [:each | each addDependentToHierachy: anObject]

    "Modified: / 21.6.2000 / 10:13:35 / Sames"
!

removeDependentFromHierachy: anObject
	self sunitRemoveDependent: 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 sunitChanged: each.
		each run: aResult]

    "Modified: / 21.6.2000 / 10:14:01 / Sames"
! !