TestSuite.st
changeset 238 384805dcb5dd
parent 222 8e6f482297fa
child 243 cbce69b15370
equal deleted inserted replaced
237:5dfc55110c28 238:384805dcb5dd
    16 named: aString
    16 named: aString
    17 
    17 
    18 	^self new
    18 	^self new
    19 		name: aString;
    19 		name: aString;
    20 		yourself
    20 		yourself
       
    21 ! !
       
    22 
       
    23 !TestSuite class methodsFor:'others'!
       
    24 
       
    25 version_CVS
       
    26     ^ '$Header: /cvs/stx/stx/goodies/sunit/TestSuite.st,v 1.20 2011-07-05 15:45:47 cg Exp $'
    21 ! !
    27 ! !
    22 
    28 
    23 !TestSuite methodsFor:'accessing'!
    29 !TestSuite methodsFor:'accessing'!
    24 
    30 
    25 addTest: aTest
    31 addTest: aTest
   186 		sunitEnsure: [self resources reverseDo: [:each | each reset]].
   192 		sunitEnsure: [self resources reverseDo: [:each | each reset]].
   187 	^result
   193 	^result
   188 
   194 
   189     "Created: / 15-03-2010 / 20:36:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   195     "Created: / 15-03-2010 / 20:36:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   190     "Modified: / 19-03-2010 / 08:02:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   196     "Modified: / 19-03-2010 / 08:02:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   197 !
       
   198 
       
   199 runBeforeEachDo:block1 afterEachDo: block2
       
   200         | result |
       
   201         result := TestResult new.
       
   202         result name: name.
       
   203         [self run: result beforeEachDo:block1 afterEachDo: block2]
       
   204                 sunitEnsure: [self resources reverseDo: [:each | each reset]].
       
   205         ^result
       
   206 
       
   207     "Modified: / 19-03-2010 / 08:02:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   208     "Created: / 05-07-2011 / 16:51:25 / cg"
   191 ! !
   209 ! !
   192 
   210 
   193 !TestSuite methodsFor:'testing'!
   211 !TestSuite methodsFor:'testing'!
   194 
   212 
   195 areAllResourcesAvailable
   213 areAllResourcesAvailable
   208 ! !
   226 ! !
   209 
   227 
   210 !TestSuite class methodsFor:'documentation'!
   228 !TestSuite class methodsFor:'documentation'!
   211 
   229 
   212 version
   230 version
   213     ^ '$Header: /cvs/stx/stx/goodies/sunit/TestSuite.st,v 1.19 2011-06-29 19:15:49 cg Exp $'
   231     ^ '$Header: /cvs/stx/stx/goodies/sunit/TestSuite.st,v 1.20 2011-07-05 15:45:47 cg Exp $'
   214 !
   232 !
   215 
   233 
   216 version_SVN
   234 version_SVN
   217     ^ '§Id: TestSuite.st 203 2010-09-11 14:49:03Z vranyj1 §'
   235     ^ '§Id: TestSuite.st 203 2010-09-11 14:49:03Z vranyj1 §'
   218 ! !
   236 ! !